use of org.commonjava.indy.schedule.conf.ScheduleDBConfig 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));
}
Aggregations