use of com.hazelcast.wan.impl.WanReplicationService in project hazelcast by hazelcast.
the class TimedMemberStateFactory method createMemState.
private void createMemState(MemberStateImpl memberState, Collection<StatisticsAwareService> services) {
Config config = instance.getConfig();
for (StatisticsAwareService service : services) {
if (service instanceof MapService) {
handleMap(memberState, ((MapService) service).getStats());
} else if (service instanceof MultiMapService) {
handleMultiMap(memberState, ((MultiMapService) service).getStats());
} else if (service instanceof QueueService) {
handleQueue(memberState, ((QueueService) service).getStats());
} else if (service instanceof TopicService) {
handleTopic(memberState, ((TopicService) service).getStats());
} else if (service instanceof ReliableTopicService) {
handleReliableTopic(memberState, ((ReliableTopicService) service).getStats());
} else if (service instanceof DistributedExecutorService) {
handleExecutorService(memberState, config, ((DistributedExecutorService) service).getStats());
} else if (service instanceof DistributedScheduledExecutorService) {
handleScheduledExecutorService(memberState, config, ((DistributedScheduledExecutorService) service).getStats());
} else if (service instanceof DistributedDurableExecutorService) {
handleDurableExecutorService(memberState, config, ((DistributedDurableExecutorService) service).getStats());
} else if (service instanceof ReplicatedMapService) {
handleReplicatedMap(memberState, config, ((ReplicatedMapService) service).getStats());
} else if (service instanceof PNCounterService) {
handlePNCounter(memberState, config, ((PNCounterService) service).getStats());
} else if (service instanceof FlakeIdGeneratorService) {
handleFlakeIdGenerator(memberState, config, ((FlakeIdGeneratorService) service).getStats());
} else if (service instanceof CacheService) {
handleCache(memberState, (CacheService) service);
}
}
WanReplicationService wanReplicationService = instance.node.nodeEngine.getWanReplicationService();
Map<String, LocalWanStats> wanStats = wanReplicationService.getStats();
if (wanStats != null) {
handleWan(memberState, wanStats);
}
}
use of com.hazelcast.wan.impl.WanReplicationService 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);
}
use of com.hazelcast.wan.impl.WanReplicationService 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);
}
use of com.hazelcast.wan.impl.WanReplicationService in project hazelcast by hazelcast.
the class AbstractCacheService method deleteCache.
@Override
public void deleteCache(String cacheNameWithPrefix, UUID callerUuid, boolean destroy) {
CacheConfig config = deleteCacheConfig(cacheNameWithPrefix);
if (config == null) {
// Cache is already cleaned up
return;
}
if (destroy) {
cacheEventHandler.destroy(cacheNameWithPrefix, SOURCE_NOT_AVAILABLE);
destroySegments(config);
} else {
closeSegments(cacheNameWithPrefix);
}
WanReplicationService wanService = nodeEngine.getWanReplicationService();
wanService.removeWanEventCounters(ICacheService.SERVICE_NAME, cacheNameWithPrefix);
cacheContexts.remove(cacheNameWithPrefix);
operationProviderCache.remove(cacheNameWithPrefix);
deregisterAllListener(cacheNameWithPrefix);
setStatisticsEnabled(config, cacheNameWithPrefix, false);
setManagementEnabled(config, cacheNameWithPrefix, false);
deleteCacheStat(cacheNameWithPrefix);
deleteCacheResources(cacheNameWithPrefix);
}
use of com.hazelcast.wan.impl.WanReplicationService in project hazelcast by hazelcast.
the class HttpPostCommandProcessor method handleWanConsistencyCheck.
/**
* Initiates a WAN consistency check for a single map and the WAN replication
* name and publisher ID defined by the command parameters.
*
* @param cmd the HTTP command
*/
@SuppressWarnings("checkstyle:magicnumber")
private void handleWanConsistencyCheck(HttpPostCommand cmd) throws Throwable {
String[] params = decodeParamsAndAuthenticate(cmd, 5);
String wanReplicationName = params[2];
String publisherId = params[3];
String mapName = params[4];
WanReplicationService service = getNode().getNodeEngine().getWanReplicationService();
UUID uuid = service.consistencyCheck(wanReplicationName, publisherId, mapName);
prepareResponse(cmd, response(SUCCESS, "message", "Consistency check initiated", "uuid", uuid.toString()));
}
Aggregations