Class CassandraDbPropertiesConfig

java.lang.Object
com.persequor.extension.db.CassandraDbPropertiesConfig
All Implemented Interfaces:
ICassandraDbConfig

public abstract class CassandraDbPropertiesConfig extends Object implements 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);
    }
 }