Search in sources :

Example 1 with IndyStoreManagerConfig

use of org.commonjava.indy.core.conf.IndyStoreManagerConfig in project indy by Commonjava.

the class CassandraTCKFixtureProvider method init.

protected void init() throws Exception {
    EmbeddedCassandraServerHelper.startEmbeddedCassandra();
    CassandraConfig config = new CassandraConfig();
    config.setEnabled(true);
    config.setCassandraHost("localhost");
    config.setCassandraPort(9142);
    client = new CassandraClient(config);
    IndyStoreManagerConfig storeConfig = new IndyStoreManagerConfig("noncontent", 1);
    DefaultIndyConfiguration indyConfig = new DefaultIndyConfiguration();
    indyConfig.setKeyspaceReplicas(1);
    client = new CassandraClient(config);
    CassandraStoreQuery storeQuery = new CassandraStoreQuery(client, storeConfig, indyConfig);
    dataManager = new CassandraStoreDataManager(storeQuery, new IndyObjectMapper(true));
}
Also used : IndyObjectMapper(org.commonjava.indy.model.core.io.IndyObjectMapper) CassandraClient(org.commonjava.indy.subsys.cassandra.CassandraClient) IndyStoreManagerConfig(org.commonjava.indy.core.conf.IndyStoreManagerConfig) CassandraConfig(org.commonjava.indy.subsys.cassandra.config.CassandraConfig) DefaultIndyConfiguration(org.commonjava.indy.conf.DefaultIndyConfiguration)

Example 2 with IndyStoreManagerConfig

use of org.commonjava.indy.core.conf.IndyStoreManagerConfig in project indy by Commonjava.

the class CassandraStoreTest method start.

@Before
public void start() throws Exception {
    EmbeddedCassandraServerHelper.startEmbeddedCassandra();
    CassandraConfig config = new CassandraConfig();
    config.setEnabled(true);
    config.setCassandraHost("localhost");
    config.setCassandraPort(9142);
    client = new CassandraClient(config);
    IndyStoreManagerConfig storeConfig = new IndyStoreManagerConfig("noncontent", 1);
    DefaultIndyConfiguration indyConfig = new DefaultIndyConfiguration();
    indyConfig.setKeyspaceReplicas(1);
    storeQuery = new CassandraStoreQuery(client, storeConfig, indyConfig);
}
Also used : CassandraClient(org.commonjava.indy.subsys.cassandra.CassandraClient) IndyStoreManagerConfig(org.commonjava.indy.core.conf.IndyStoreManagerConfig) CassandraConfig(org.commonjava.indy.subsys.cassandra.config.CassandraConfig) DefaultIndyConfiguration(org.commonjava.indy.conf.DefaultIndyConfiguration) Before(org.junit.Before)

Aggregations

DefaultIndyConfiguration (org.commonjava.indy.conf.DefaultIndyConfiguration)2 IndyStoreManagerConfig (org.commonjava.indy.core.conf.IndyStoreManagerConfig)2 CassandraClient (org.commonjava.indy.subsys.cassandra.CassandraClient)2 CassandraConfig (org.commonjava.indy.subsys.cassandra.config.CassandraConfig)2 IndyObjectMapper (org.commonjava.indy.model.core.io.IndyObjectMapper)1 Before (org.junit.Before)1