Search in sources :

Example 16 with ConfigurationBuilder

use of org.infinispan.configuration.cache.ConfigurationBuilder 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));
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) ScheduleDBConfig(org.commonjava.indy.schedule.conf.ScheduleDBConfig) CacheProducer(org.commonjava.indy.subsys.infinispan.CacheProducer) CassandraClient(org.commonjava.indy.subsys.cassandra.CassandraClient) CassandraConfig(org.commonjava.indy.subsys.cassandra.config.CassandraConfig) DefaultIndyConfiguration(org.commonjava.indy.conf.DefaultIndyConfiguration) Before(org.junit.Before)

Example 17 with ConfigurationBuilder

use of org.infinispan.configuration.cache.ConfigurationBuilder in project indy by Commonjava.

the class ContentControllerTest method setupClass.

@BeforeClass
public static void setupClass() {
    GlobalConfiguration globalConfiguration = new GlobalConfigurationBuilder().globalJmxStatistics().allowDuplicateDomains(true).build();
    cacheManager = new DefaultCacheManager(globalConfiguration, new ConfigurationBuilder().simpleCache(true).build());
    contentMetadata = cacheManager.getCache("content-metadata", true);
}
Also used : GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) GlobalConfiguration(org.infinispan.configuration.global.GlobalConfiguration) BeforeClass(org.junit.BeforeClass)

Example 18 with ConfigurationBuilder

use of org.infinispan.configuration.cache.ConfigurationBuilder in project indy by Commonjava.

the class PromotionManagerTest method setupClass.

@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    contentMetadata = cacheManager.getCache("content-metadata", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Example 19 with ConfigurationBuilder

use of org.infinispan.configuration.cache.ConfigurationBuilder in project indy by Commonjava.

the class HttpProxyTest method setupClass.

@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    contentMetadata = cacheManager.getCache("content-metadata", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Example 20 with ConfigurationBuilder

use of org.infinispan.configuration.cache.ConfigurationBuilder in project indy by Commonjava.

the class FoloRecordCacheTest method setupClass.

// @Rule
// public TemporaryFolder temp = new TemporaryFolder();
@BeforeClass
public static void setupClass() {
    cacheManager = new DefaultCacheManager(new ConfigurationBuilder().simpleCache(true).build());
    sealed = cacheManager.getCache("sealed", true);
    inProgress = cacheManager.getCache("in-progress", true);
}
Also used : DefaultCacheManager(org.infinispan.manager.DefaultCacheManager) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) BeforeClass(org.junit.BeforeClass)

Aggregations

ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)53 Configuration (org.infinispan.configuration.cache.Configuration)24 Test (org.junit.Test)19 GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)14 DefaultCacheManager (org.infinispan.manager.DefaultCacheManager)12 ClusteringConfigurationBuilder (org.infinispan.configuration.cache.ClusteringConfigurationBuilder)7 GlobalConfiguration (org.infinispan.configuration.global.GlobalConfiguration)7 Properties (java.util.Properties)6 Map (java.util.Map)5 InfinispanRegionFactory (org.hibernate.cache.infinispan.InfinispanRegionFactory)5 TimestampsRegionImpl (org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl)5 BeforeClass (org.junit.BeforeClass)5 AdvancedCache (org.infinispan.AdvancedCache)4 BackupConfigurationBuilder (org.infinispan.configuration.cache.BackupConfigurationBuilder)4 CacheMode (org.infinispan.configuration.cache.CacheMode)4 SitesConfigurationBuilder (org.infinispan.configuration.cache.SitesConfigurationBuilder)3 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)3 HashMap (java.util.HashMap)2 Consumer (java.util.function.Consumer)2 CacheProducer (org.commonjava.indy.subsys.infinispan.CacheProducer)2