use of com.hazelcast.topic.impl.reliable.ReliableTopicService 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.topic.impl.reliable.ReliableTopicService in project hazelcast by hazelcast.
the class ServiceManagerImpl method registerDefaultServices.
private void registerDefaultServices(ServicesConfig servicesConfig) {
if (!servicesConfig.isEnableDefaults()) {
return;
}
logger.finest("Registering default services...");
registerService(MapService.SERVICE_NAME, createService(MapService.class));
registerService(LockSupportService.SERVICE_NAME, new LockSupportServiceImpl(nodeEngine));
registerService(QueueService.SERVICE_NAME, new QueueService(nodeEngine));
registerService(TopicService.SERVICE_NAME, new TopicService());
registerService(ReliableTopicService.SERVICE_NAME, new ReliableTopicService(nodeEngine));
registerService(MultiMapService.SERVICE_NAME, new MultiMapService(nodeEngine));
registerService(ListService.SERVICE_NAME, new ListService(nodeEngine));
registerService(SetService.SERVICE_NAME, new SetService(nodeEngine));
registerService(DistributedExecutorService.SERVICE_NAME, new DistributedExecutorService());
registerService(DistributedDurableExecutorService.SERVICE_NAME, new DistributedDurableExecutorService(nodeEngine));
registerService(FlakeIdGeneratorService.SERVICE_NAME, new FlakeIdGeneratorService(nodeEngine));
registerService(ReplicatedMapService.SERVICE_NAME, new ReplicatedMapService(nodeEngine));
registerService(RingbufferService.SERVICE_NAME, new RingbufferService(nodeEngine));
registerService(XAService.SERVICE_NAME, new XAService(nodeEngine));
registerService(CardinalityEstimatorService.SERVICE_NAME, new CardinalityEstimatorService());
registerService(PNCounterService.SERVICE_NAME, new PNCounterService());
registerService(CRDTReplicationMigrationService.SERVICE_NAME, new CRDTReplicationMigrationService());
registerService(DistributedScheduledExecutorService.SERVICE_NAME, new DistributedScheduledExecutorService());
registerService(MetricsService.SERVICE_NAME, new MetricsService(nodeEngine));
registerCacheServiceIfAvailable();
readServiceDescriptors();
}
use of com.hazelcast.topic.impl.reliable.ReliableTopicService in project hazelcast by hazelcast.
the class ClientReliableTopicStatsTest method publish_countStats.
@Test
public void publish_countStats() {
topic.publish("message1");
topic.publishAsync("message2");
assertTrueEventually(() -> {
ReliableTopicService service = getNode(instance).getNodeEngine().getService(SERVICE_NAME);
LocalTopicStatsImpl localTopicStats = service.getLocalTopicStats(topic.getName());
assertEquals(2, localTopicStats.getPublishOperationCount());
assertEquals(2, localTopicStats.getReceiveOperationCount());
});
}
use of com.hazelcast.topic.impl.reliable.ReliableTopicService in project hazelcast by hazelcast.
the class ClientReliableTopicStatsTest method publishAll_countStats.
@Test
public void publishAll_countStats() throws Exception {
topic.publishAll(asList("message1", "message2", "message3"));
topic.publishAllAsync(asList("message4", "message5", "message6"));
assertTrueEventually(() -> {
ReliableTopicService service = getNode(instance).getNodeEngine().getService(SERVICE_NAME);
LocalTopicStatsImpl localTopicStats = service.getLocalTopicStats(topic.getName());
assertEquals(6, localTopicStats.getPublishOperationCount());
assertEquals(6, localTopicStats.getReceiveOperationCount());
});
}
Aggregations