Search in sources :

Example 1 with ClusterWideConfigurationService

use of com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService in project hazelcast by hazelcast.

the class AbstractAddConfigMessageTask method processMessage.

@Override
public final void processMessage() {
    IdentifiedDataSerializable config = getConfig();
    ClusterWideConfigurationService service = getService(ConfigurationService.SERVICE_NAME);
    if (checkStaticConfigDoesNotExist(config)) {
        service.broadcastConfigAsync(config).whenCompleteAsync(this);
    } else {
        sendResponse(null);
    }
}
Also used : IdentifiedDataSerializable(com.hazelcast.nio.serialization.IdentifiedDataSerializable) ClusterWideConfigurationService(com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService)

Example 2 with ClusterWideConfigurationService

use of com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService in project hazelcast by hazelcast.

the class TestNodeContext method createNodeExtension.

@Override
public NodeExtension createNodeExtension(Node node) {
    when(nodeExtension.createService(MapService.class)).thenReturn(mock(MapService.class));
    when(nodeExtension.createService(ICacheService.class)).thenReturn(mock(ICacheService.class));
    when(nodeExtension.createService(WanReplicationService.class)).thenReturn(mock(WanReplicationService.class));
    when(nodeExtension.createService(eq(ClusterWideConfigurationService.class), any())).thenAnswer(invocation -> new ClusterWideConfigurationService((NodeEngine) invocation.getArguments()[1], mock(DynamicConfigListener.class)));
    when(nodeExtension.createSerializationService()).thenReturn(new DefaultSerializationServiceBuilder().build());
    when(nodeExtension.isStartCompleted()).thenReturn(true);
    when(nodeExtension.isNodeVersionCompatibleWith(any(Version.class))).thenReturn(true);
    when(nodeExtension.getMemoryStats()).thenReturn(new DefaultMemoryStats());
    when(nodeExtension.createMemberUuid()).thenReturn(UuidUtil.newUnsecureUUID());
    when(nodeExtension.getCPPersistenceService()).thenReturn(new NopCPPersistenceService());
    when(nodeExtension.getAuditlogService()).thenReturn(NoOpAuditlogService.INSTANCE);
    return nodeExtension;
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) DefaultSerializationServiceBuilder(com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder) ICacheService(com.hazelcast.cache.impl.ICacheService) Version(com.hazelcast.version.Version) NopCPPersistenceService(com.hazelcast.cp.internal.persistence.NopCPPersistenceService) DefaultMemoryStats(com.hazelcast.internal.memory.DefaultMemoryStats) ClusterWideConfigurationService(com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService) MapService(com.hazelcast.map.impl.MapService) WanReplicationService(com.hazelcast.wan.impl.WanReplicationService)

Aggregations

ClusterWideConfigurationService (com.hazelcast.internal.dynamicconfig.ClusterWideConfigurationService)2 ICacheService (com.hazelcast.cache.impl.ICacheService)1 NopCPPersistenceService (com.hazelcast.cp.internal.persistence.NopCPPersistenceService)1 DefaultMemoryStats (com.hazelcast.internal.memory.DefaultMemoryStats)1 DefaultSerializationServiceBuilder (com.hazelcast.internal.serialization.impl.DefaultSerializationServiceBuilder)1 MapService (com.hazelcast.map.impl.MapService)1 IdentifiedDataSerializable (com.hazelcast.nio.serialization.IdentifiedDataSerializable)1 NodeEngine (com.hazelcast.spi.impl.NodeEngine)1 Version (com.hazelcast.version.Version)1 WanReplicationService (com.hazelcast.wan.impl.WanReplicationService)1