Search in sources :

Example 1 with DefaultMemoryStats

use of com.hazelcast.internal.memory.DefaultMemoryStats 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

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