Package com.persequor.extension.db
Class CassandraDbPropertiesConfig
java.lang.Object
com.persequor.extension.db.CassandraDbPropertiesConfig
- All Implemented Interfaces:
ICassandraDbConfig
This class reads
ICassandraDbConfig
from the property file.
Whenever null is returned by any of the getters (e.g. property is not present in a configuration file) , the corresponding Saga Cassandra connection value will be used instead.
You configuration file/environment could contain the following:
{prefix}.username=xxxx {prefix}.password=xxxx {prefix}.address=xxxx:yyyy,xxxx {prefix}.keyspace=xxxx
Your own configuration class could look like:
public class ExtraModuleCassandraConfig extends CassandraDbPropertiesConfig{ @Inject public ExtraModuleCassandraConfig(ISagaExtensionProperties properties) { super("extra-module-prefix", properties); } }
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.persequor.extension.db.ICassandraDbConfig
getReplicationFactor, getReplications, getReplicationStrategy
-
Constructor Details
-
CassandraDbPropertiesConfig
-
-
Method Details
-
getUsername
- Specified by:
getUsername
in interfaceICassandraDbConfig
-
getPassword
- Specified by:
getPassword
in interfaceICassandraDbConfig
-
getAddress
- Specified by:
getAddress
in interfaceICassandraDbConfig
-
getKeyspace
- Specified by:
getKeyspace
in interfaceICassandraDbConfig
-
useCompression
- Specified by:
useCompression
in interfaceICassandraDbConfig
-
getDefaultKeyspace
You must return a default key-space to be used when Saga is run without configuration files.- Returns:
- the default keyspace to use.
-