Search in sources :

Example 36 with NodeEngine

use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.

the class TopicProxySupport method initialize.

@Override
public void initialize() {
    NodeEngine nodeEngine = getNodeEngine();
    TopicConfig config = nodeEngine.getConfig().findTopicConfig(name);
    multithreaded = config.isMultiThreadingEnabled();
    for (ListenerConfig listenerConfig : config.getMessageListenerConfigs()) {
        initialize(listenerConfig);
    }
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) ListenerConfig(com.hazelcast.config.ListenerConfig) TopicConfig(com.hazelcast.config.TopicConfig)

Example 37 with NodeEngine

use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.

the class WanCheckConsistencyOperation method run.

@Override
public void run() throws Exception {
    NodeEngine nodeEngine = getNodeEngine();
    WanReplicationService wanReplicationService = nodeEngine.getWanReplicationService();
    wanReplicationService.consistencyCheck(schemeName, publisherName, mapName);
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) WanReplicationService(com.hazelcast.wan.impl.WanReplicationService)

Example 38 with NodeEngine

use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.

the class ClearWanQueuesOperation method run.

@Override
public void run() throws Exception {
    NodeEngine nodeEngine = getNodeEngine();
    WanReplicationService wanReplicationService = nodeEngine.getWanReplicationService();
    wanReplicationService.removeWanEvents(schemeName, publisherName);
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) WanReplicationService(com.hazelcast.wan.impl.WanReplicationService)

Example 39 with NodeEngine

use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.

the class AbstractMapServiceFactory method createMapService.

/**
 * Returns a {@link MapService} object by populating it with required
 * auxiliary services.
 *
 * @return {@link MapService} object
 */
@Override
public MapService createMapService() {
    NodeEngine nodeEngine = getNodeEngine();
    MapServiceContext mapServiceContext = getMapServiceContext();
    ManagedService managedService = createManagedService();
    CountingMigrationAwareService migrationAwareService = createMigrationAwareService();
    TransactionalService transactionalService = createTransactionalService();
    RemoteService remoteService = createRemoteService();
    EventPublishingService eventPublishingService = createEventPublishingService();
    PostJoinAwareService postJoinAwareService = createPostJoinAwareService();
    SplitBrainHandlerService splitBrainHandlerService = createSplitBrainHandlerService();
    WanSupportingService wanSupportingService = createReplicationSupportingService();
    StatisticsAwareService statisticsAwareService = createStatisticsAwareService();
    PartitionAwareService partitionAwareService = createPartitionAwareService();
    MapSplitBrainProtectionAwareService splitBrainProtectionAwareService = createSplitBrainProtectionAwareService();
    ClientAwareService clientAwareService = createClientAwareService();
    checkNotNull(nodeEngine, "nodeEngine should not be null");
    checkNotNull(mapServiceContext, "mapServiceContext should not be null");
    checkNotNull(managedService, "managedService should not be null");
    checkNotNull(migrationAwareService, "migrationAwareService should not be null");
    checkNotNull(transactionalService, "transactionalService should not be null");
    checkNotNull(remoteService, "remoteService should not be null");
    checkNotNull(eventPublishingService, "eventPublishingService should not be null");
    checkNotNull(postJoinAwareService, "postJoinAwareService should not be null");
    checkNotNull(splitBrainHandlerService, "splitBrainHandlerService should not be null");
    checkNotNull(wanSupportingService, "replicationSupportingService should not be null");
    checkNotNull(statisticsAwareService, "statisticsAwareService should not be null");
    checkNotNull(partitionAwareService, "partitionAwareService should not be null");
    checkNotNull(splitBrainProtectionAwareService, "splitBrainProtectionAwareService should not be null");
    checkNotNull(clientAwareService, "clientAwareService should not be null");
    MapService mapService = new MapService();
    mapService.managedService = managedService;
    mapService.migrationAwareService = migrationAwareService;
    mapService.transactionalService = transactionalService;
    mapService.remoteService = remoteService;
    mapService.eventPublishingService = eventPublishingService;
    mapService.postJoinAwareService = postJoinAwareService;
    mapService.splitBrainHandlerService = splitBrainHandlerService;
    mapService.wanSupportingService = wanSupportingService;
    mapService.statisticsAwareService = statisticsAwareService;
    mapService.mapServiceContext = mapServiceContext;
    mapService.partitionAwareService = partitionAwareService;
    mapService.splitBrainProtectionAwareService = splitBrainProtectionAwareService;
    mapService.clientAwareService = clientAwareService;
    mapServiceContext.setService(mapService);
    return mapService;
}
Also used : ManagedService(com.hazelcast.internal.services.ManagedService) StatisticsAwareService(com.hazelcast.internal.services.StatisticsAwareService) TransactionalService(com.hazelcast.internal.services.TransactionalService) CountingMigrationAwareService(com.hazelcast.spi.impl.CountingMigrationAwareService) NodeEngine(com.hazelcast.spi.impl.NodeEngine) ClientAwareService(com.hazelcast.internal.services.ClientAwareService) PostJoinAwareService(com.hazelcast.internal.services.PostJoinAwareService) RemoteService(com.hazelcast.internal.services.RemoteService) WanSupportingService(com.hazelcast.internal.services.WanSupportingService) SplitBrainHandlerService(com.hazelcast.internal.services.SplitBrainHandlerService) PartitionAwareService(com.hazelcast.internal.partition.PartitionAwareService) EventPublishingService(com.hazelcast.spi.impl.eventservice.EventPublishingService)

Example 40 with NodeEngine

use of com.hazelcast.spi.impl.NodeEngine in project hazelcast by hazelcast.

the class PartitionContainer method clearLockStore.

private void clearLockStore(String name) {
    final NodeEngine nodeEngine = mapService.getMapServiceContext().getNodeEngine();
    final LockSupportService lockService = nodeEngine.getServiceOrNull(LockSupportService.SERVICE_NAME);
    if (lockService != null) {
        final ObjectNamespace namespace = MapService.getObjectNamespace(name);
        lockService.clearLockStore(partitionId, namespace);
    }
}
Also used : NodeEngine(com.hazelcast.spi.impl.NodeEngine) LockSupportService(com.hazelcast.internal.locksupport.LockSupportService) ObjectNamespace(com.hazelcast.internal.services.ObjectNamespace)

Aggregations

NodeEngine (com.hazelcast.spi.impl.NodeEngine)165 Data (com.hazelcast.internal.serialization.Data)48 OperationService (com.hazelcast.spi.impl.operationservice.OperationService)30 Address (com.hazelcast.cluster.Address)22 Test (org.junit.Test)21 ILogger (com.hazelcast.logging.ILogger)20 HazelcastInstance (com.hazelcast.core.HazelcastInstance)18 ParallelJVMTest (com.hazelcast.test.annotation.ParallelJVMTest)18 QuickTest (com.hazelcast.test.annotation.QuickTest)18 Config (com.hazelcast.config.Config)17 Operation (com.hazelcast.spi.impl.operationservice.Operation)16 MapServiceContext (com.hazelcast.map.impl.MapServiceContext)15 IPartitionService (com.hazelcast.internal.partition.IPartitionService)12 Nonnull (javax.annotation.Nonnull)12 ArrayList (java.util.ArrayList)11 Future (java.util.concurrent.Future)11 Member (com.hazelcast.cluster.Member)10 UUID (java.util.UUID)10 InitializingObject (com.hazelcast.spi.impl.InitializingObject)9 TestHazelcastInstanceFactory (com.hazelcast.test.TestHazelcastInstanceFactory)9