use of com.hazelcast.replicatedmap.impl.ReplicatedMapService in project hazelcast by hazelcast.
the class ContainsValueOperation method run.
@Override
public void run() throws Exception {
ReplicatedMapService service = getService();
Collection<ReplicatedRecordStore> stores = service.getAllReplicatedRecordStores(name);
for (ReplicatedRecordStore store : stores) {
if (store.containsValue(value)) {
response = true;
break;
}
}
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapService 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(LockService.SERVICE_NAME, new LockServiceImpl(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(AtomicLongService.SERVICE_NAME, new AtomicLongService());
registerService(AtomicReferenceService.SERVICE_NAME, new AtomicReferenceService());
registerService(CountDownLatchService.SERVICE_NAME, new CountDownLatchService());
registerService(SemaphoreService.SERVICE_NAME, new SemaphoreService(nodeEngine));
registerService(IdGeneratorService.SERVICE_NAME, new IdGeneratorService(nodeEngine));
registerService(MapReduceService.SERVICE_NAME, new MapReduceService(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(DistributedScheduledExecutorService.SERVICE_NAME, new DistributedScheduledExecutorService());
registerCacheServiceIfAvailable();
readServiceDescriptors();
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapService in project hazelcast by hazelcast.
the class ReplicatedMapLiteMemberTest method testCreateReplicatedStoreOnLiteMember.
@Test(expected = ReplicatedMapCantBeCreatedOnLiteMemberException.class)
public void testCreateReplicatedStoreOnLiteMember() {
final HazelcastInstance lite = createSingleLiteMember();
final ReplicatedMapService service = getReplicatedMapService(lite);
service.getReplicatedRecordStore("default", true, 1);
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapService in project hazelcast by hazelcast.
the class AbstractReplicatedMapAddEntryListenerMessageTask method call.
@Override
protected Object call() {
ReplicatedMapService service = getService(ReplicatedMapService.SERVICE_NAME);
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
String registrationId;
Predicate predicate = getPredicate();
if (predicate == null) {
registrationId = eventPublishingService.addEventListener(this, new ReplicatedEntryEventFilter(getKey()), getDistributedObjectName());
} else {
registrationId = eventPublishingService.addEventListener(this, new ReplicatedQueryEventFilter(getKey(), predicate), getDistributedObjectName());
}
endpoint.addListenerDestroyAction(ReplicatedMapService.SERVICE_NAME, getDistributedObjectName(), registrationId);
return registrationId;
}
use of com.hazelcast.replicatedmap.impl.ReplicatedMapService in project hazelcast by hazelcast.
the class ReplicatedMapClearMessageTask method reduce.
@Override
protected Object reduce(Map<Integer, Object> map) {
int deletedEntrySize = 0;
for (Object deletedEntryPerPartition : map.values()) {
deletedEntrySize += (Integer) deletedEntryPerPartition;
}
ReplicatedMapService service = getService(getServiceName());
ReplicatedMapEventPublishingService eventPublishingService = service.getEventPublishingService();
eventPublishingService.fireMapClearedEvent(deletedEntrySize, getDistributedObjectName());
return null;
}
Aggregations