use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.
the class MultiMapKeyValueSource method open.
@Override
public boolean open(NodeEngine nodeEngine) {
NodeEngineImpl nei = (NodeEngineImpl) nodeEngine;
IPartitionService ps = nei.getPartitionService();
MultiMapService multiMapService = nei.getService(MultiMapService.SERVICE_NAME);
ss = nei.getSerializationService();
Address partitionOwner = ps.getPartitionOwner(partitionId);
if (partitionOwner == null) {
return false;
}
multiMapContainer = multiMapService.getOrCreateCollectionContainer(partitionId, multiMapName);
isBinary = multiMapContainer.getConfig().isBinary();
keyIterator = multiMapContainer.keySet().iterator();
return true;
}
use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.
the class AbstractMultiMapAddEntryListenerMessageTask method call.
@Override
protected Object call() throws Exception {
final ClientEndpoint endpoint = getEndpoint();
final MultiMapService service = getService(MultiMapService.SERVICE_NAME);
EntryAdapter listener = new MultiMapListener();
final String name = getDistributedObjectName();
Data key = getKey();
boolean includeValue = shouldIncludeValue();
String registrationId = service.addListener(name, listener, key, includeValue, isLocalOnly());
endpoint.addListenerDestroyAction(MultiMapService.SERVICE_NAME, name, registrationId);
return registrationId;
}
use of com.hazelcast.multimap.impl.MultiMapService 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.multimap.impl.MultiMapService in project hazelcast by hazelcast.
the class AbstractMultiMapOperation method getOrCreateContainerWithoutAccess.
public final MultiMapContainer getOrCreateContainerWithoutAccess() {
if (container == null) {
MultiMapService service = getService();
container = service.getOrCreateCollectionContainerWithoutAccess(getPartitionId(), name);
}
return container;
}
use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.
the class AbstractMultiMapOperation method getOrCreateContainer.
public final MultiMapContainer getOrCreateContainer() {
if (container == null) {
MultiMapService service = getService();
container = service.getOrCreateCollectionContainer(getPartitionId(), name);
}
return container;
}
Aggregations