Search in sources :

Example 1 with TestGlobalConfigurationBuilder

use of org.infinispan.commands.module.TestGlobalConfigurationBuilder in project infinispan by infinispan.

the class CacheEntryCloudEventsTest method addNode.

private Address addNode() {
    GlobalConfigurationBuilder managerBuilder = GlobalConfigurationBuilder.defaultClusteredBuilder();
    managerBuilder.defaultCacheName(CACHE_NAME).serialization().addContextInitializer(TestDataSCI.INSTANCE);
    if (serverMode) {
        managerBuilder.addModule(PrivateGlobalConfigurationBuilder.class).serverMode(true);
    }
    CloudEventsGlobalConfigurationBuilder cloudEventsGlobalBuilder = managerBuilder.addModule(CloudEventsGlobalConfigurationBuilder.class);
    cloudEventsGlobalBuilder.bootstrapServers("localhost:9092");
    cloudEventsGlobalBuilder.cacheEntriesTopic("ispn");
    TestGlobalConfigurationBuilder testGlobalConfigurationBuilder = managerBuilder.addModule(TestGlobalConfigurationBuilder.class);
    testGlobalConfigurationBuilder.testGlobalComponent(KafkaEventSender.class.getName(), mockSender);
    ConfigurationBuilder cacheBuilder = new ConfigurationBuilder();
    cacheBuilder.clustering().cacheMode(CacheMode.DIST_SYNC);
    cacheBuilder.memory().storage(storageType);
    EmbeddedCacheManager manager = addClusterEnabledCacheManager(managerBuilder, cacheBuilder);
    return manager.getAddress();
}
Also used : TestGlobalConfigurationBuilder(org.infinispan.commands.module.TestGlobalConfigurationBuilder) PrivateGlobalConfigurationBuilder(org.infinispan.configuration.internal.PrivateGlobalConfigurationBuilder) GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) CloudEventsGlobalConfigurationBuilder(org.infinispan.cloudevents.configuration.CloudEventsGlobalConfigurationBuilder) KafkaEventSender(org.infinispan.cloudevents.impl.KafkaEventSender) TestGlobalConfigurationBuilder(org.infinispan.commands.module.TestGlobalConfigurationBuilder) ConfigurationBuilder(org.infinispan.configuration.cache.ConfigurationBuilder) PrivateGlobalConfigurationBuilder(org.infinispan.configuration.internal.PrivateGlobalConfigurationBuilder) GlobalConfigurationBuilder(org.infinispan.configuration.global.GlobalConfigurationBuilder) CloudEventsGlobalConfigurationBuilder(org.infinispan.cloudevents.configuration.CloudEventsGlobalConfigurationBuilder) PrivateGlobalConfigurationBuilder(org.infinispan.configuration.internal.PrivateGlobalConfigurationBuilder) EmbeddedCacheManager(org.infinispan.manager.EmbeddedCacheManager) TestGlobalConfigurationBuilder(org.infinispan.commands.module.TestGlobalConfigurationBuilder) CloudEventsGlobalConfigurationBuilder(org.infinispan.cloudevents.configuration.CloudEventsGlobalConfigurationBuilder)

Aggregations

CloudEventsGlobalConfigurationBuilder (org.infinispan.cloudevents.configuration.CloudEventsGlobalConfigurationBuilder)1 KafkaEventSender (org.infinispan.cloudevents.impl.KafkaEventSender)1 TestGlobalConfigurationBuilder (org.infinispan.commands.module.TestGlobalConfigurationBuilder)1 ConfigurationBuilder (org.infinispan.configuration.cache.ConfigurationBuilder)1 GlobalConfigurationBuilder (org.infinispan.configuration.global.GlobalConfigurationBuilder)1 PrivateGlobalConfigurationBuilder (org.infinispan.configuration.internal.PrivateGlobalConfigurationBuilder)1 EmbeddedCacheManager (org.infinispan.manager.EmbeddedCacheManager)1