use of org.commonjava.indy.subsys.cassandra.CassandraClient 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));
}
use of org.commonjava.indy.subsys.cassandra.CassandraClient 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);
}
use of org.commonjava.indy.subsys.cassandra.CassandraClient in project indy by Commonjava.
the class ScheduleTest 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);
ScheduleDBConfig scheduleDBConfig = new ScheduleDBConfig(SCHEDULE_KEYSPACE, 1, 60 * 60 * 1000, 3);
DefaultIndyConfiguration indyConfig = new DefaultIndyConfiguration();
indyConfig.setKeyspaceReplicas(1);
DefaultCacheManager cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
scheduleDB = new ScheduleDB(indyConfig, scheduleDBConfig, client, new CacheProducer(null, cacheManager, null));
}
use of org.commonjava.indy.subsys.cassandra.CassandraClient in project indy by Commonjava.
the class AbstractIndyFunctionalTest method stop.
@After
public void stop() throws IndyLifecycleException {
CassandraClient cassandraClient = CDI.current().select(CassandraClient.class).get();
dropKeyspace("cache_", cassandraClient);
dropKeyspace("storage_", cassandraClient);
dropKeyspace("schedule_", cassandraClient);
dropKeyspace("store_", cassandraClient);
cassandraClient.close();
closeCacheProvider();
closeQuietly(fixture);
closeQuietly(client);
}
Aggregations