Search in sources :

Example 1 with MultiMapService

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;
}
Also used : NodeEngineImpl(com.hazelcast.spi.impl.NodeEngineImpl) Address(com.hazelcast.nio.Address) IPartitionService(com.hazelcast.spi.partition.IPartitionService) MultiMapService(com.hazelcast.multimap.impl.MultiMapService)

Example 2 with MultiMapService

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;
}
Also used : MultiMapService(com.hazelcast.multimap.impl.MultiMapService) EntryAdapter(com.hazelcast.core.EntryAdapter) Data(com.hazelcast.nio.serialization.Data) ClientEndpoint(com.hazelcast.client.ClientEndpoint)

Example 3 with MultiMapService

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);
    }
}
Also used : DistributedDurableExecutorService(com.hazelcast.durableexecutor.impl.DistributedDurableExecutorService) StatisticsAwareService(com.hazelcast.internal.services.StatisticsAwareService) SocketInterceptorConfig(com.hazelcast.config.SocketInterceptorConfig) ConfigAccessor.getActiveMemberNetworkConfig(com.hazelcast.config.ConfigAccessor.getActiveMemberNetworkConfig) ManagementCenterConfig(com.hazelcast.config.ManagementCenterConfig) CacheConfig(com.hazelcast.config.CacheConfig) SSLConfig(com.hazelcast.config.SSLConfig) Config(com.hazelcast.config.Config) MultiMapService(com.hazelcast.multimap.impl.MultiMapService) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService) QueueService(com.hazelcast.collection.impl.queue.QueueService) WanReplicationService(com.hazelcast.wan.impl.WanReplicationService) FlakeIdGeneratorService(com.hazelcast.flakeidgen.impl.FlakeIdGeneratorService) TopicService(com.hazelcast.topic.impl.TopicService) ReliableTopicService(com.hazelcast.topic.impl.reliable.ReliableTopicService) DistributedScheduledExecutorService(com.hazelcast.scheduledexecutor.impl.DistributedScheduledExecutorService) ReliableTopicService(com.hazelcast.topic.impl.reliable.ReliableTopicService) LocalWanStats(com.hazelcast.internal.monitor.LocalWanStats) DistributedExecutorService(com.hazelcast.executor.impl.DistributedExecutorService) MultiMapService(com.hazelcast.multimap.impl.MultiMapService) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService) MapService(com.hazelcast.map.impl.MapService) PNCounterService(com.hazelcast.internal.crdt.pncounter.PNCounterService) CacheService(com.hazelcast.cache.impl.CacheService)

Example 4 with MultiMapService

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;
}
Also used : MultiMapService(com.hazelcast.multimap.impl.MultiMapService)

Example 5 with MultiMapService

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;
}
Also used : MultiMapService(com.hazelcast.multimap.impl.MultiMapService)

Aggregations

MultiMapService (com.hazelcast.multimap.impl.MultiMapService)19 QueueService (com.hazelcast.collection.impl.queue.QueueService)3 DistributedExecutorService (com.hazelcast.executor.impl.DistributedExecutorService)3 Data (com.hazelcast.internal.serialization.Data)3 MapService (com.hazelcast.map.impl.MapService)3 ReplicatedMapService (com.hazelcast.replicatedmap.impl.ReplicatedMapService)3 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)3 TopicService (com.hazelcast.topic.impl.TopicService)3 CacheConfig (com.hazelcast.config.CacheConfig)2 Config (com.hazelcast.config.Config)2 EntryAdapter (com.hazelcast.core.EntryAdapter)2 DistributedDurableExecutorService (com.hazelcast.durableexecutor.impl.DistributedDurableExecutorService)2 FlakeIdGeneratorService (com.hazelcast.flakeidgen.impl.FlakeIdGeneratorService)2 PNCounterService (com.hazelcast.internal.crdt.pncounter.PNCounterService)2 MultiMapRecord (com.hazelcast.multimap.impl.MultiMapRecord)2 DistributedScheduledExecutorService (com.hazelcast.scheduledexecutor.impl.DistributedScheduledExecutorService)2 Accessors.getNodeEngineImpl (com.hazelcast.test.Accessors.getNodeEngineImpl)2 ReliableTopicService (com.hazelcast.topic.impl.reliable.ReliableTopicService)2 CacheStatistics (com.hazelcast.cache.CacheStatistics)1 CacheService (com.hazelcast.cache.impl.CacheService)1