use of org.infinispan.cloudevents.configuration.CloudEventsGlobalConfigurationBuilder 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();
}
Aggregations