Search in sources :

Example 36 with Configuration

use of org.infinispan.configuration.cache.Configuration in project wildfly by wildfly.

the class DefaultCacheContainerTestCase method defineConfiguration.

@Test
public void defineConfiguration() {
    ConfigurationBuilder builder = new ConfigurationBuilder();
    Configuration config = builder.build();
    when(this.manager.defineConfiguration("other", config)).thenReturn(config);
    Configuration result = this.subject.defineConfiguration("other", config);
    assertSame(config, result);
}
Also used : ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) GlobalConfiguration(org.infinispan.configuration.global.GlobalConfiguration) Configuration(org.infinispan.configuration.cache.Configuration) Test(org.junit.Test)

Example 37 with Configuration

use of org.infinispan.configuration.cache.Configuration in project wildfly by wildfly.

the class ConfigurationServiceConfigurator method build.

@Override
public final ServiceBuilder<?> build(ServiceTarget target) {
    ServiceBuilder<?> builder = target.addService(this.getServiceName());
    Consumer<Configuration> configuration = new CompositeDependency(this.container, this.dependency).register(builder).provides(this.getServiceName());
    Service service = new FunctionalService<>(configuration, Function.identity(), this, this);
    return builder.setInstance(service).setInitialMode(ServiceController.Mode.ON_DEMAND);
}
Also used : Configuration(org.infinispan.configuration.cache.Configuration) FunctionalService(org.wildfly.clustering.service.FunctionalService) FunctionalService(org.wildfly.clustering.service.FunctionalService) Service(org.jboss.msc.Service) CompositeDependency(org.wildfly.clustering.service.CompositeDependency)

Aggregations

Configuration (org.infinispan.configuration.cache.Configuration)37 ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)24 Test (org.junit.Test)24 Properties (java.util.Properties)12 AdvancedCache (org.infinispan.AdvancedCache)9 GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)6 InfinispanRegionFactory (org.hibernate.cache.infinispan.InfinispanRegionFactory)5 EntityRegionImpl (org.hibernate.cache.infinispan.entity.EntityRegionImpl)4 GlobalConfiguration (org.infinispan.configuration.global.GlobalConfiguration)4 CacheMode (org.infinispan.configuration.cache.CacheMode)3 TransactionConfiguration (org.infinispan.configuration.cache.TransactionConfiguration)3 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)3 CollectionRegionImpl (org.hibernate.cache.infinispan.collection.CollectionRegionImpl)2 QueryResultsRegionImpl (org.hibernate.cache.infinispan.query.QueryResultsRegionImpl)2 TimestampsRegionImpl (org.hibernate.cache.infinispan.timestamp.TimestampsRegionImpl)2 DefaultCacheManager (org.infinispan.manager.DefaultCacheManager)2 CacheProperties (org.wildfly.clustering.ee.cache.CacheProperties)2 TransactionBatch (org.wildfly.clustering.ee.infinispan.TransactionBatch)2 Method (java.lang.reflect.Method)1 Map (java.util.Map)1