Search in sources :

Example 6 with MultiMapService

use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.

the class TimedMemberStateFactory method createMemState.

private void createMemState(TimedMemberState timedMemberState, MemberStateImpl memberState, Collection<StatisticsAwareService> services) {
    int count = 0;
    Config config = instance.getConfig();
    Set<String> longInstanceNames = new HashSet<String>(maxVisibleInstanceCount);
    for (StatisticsAwareService service : services) {
        if (count < maxVisibleInstanceCount) {
            if (service instanceof MapService) {
                count = handleMap(memberState, count, config, ((MapService) service).getStats(), longInstanceNames);
            } else if (service instanceof MultiMapService) {
                count = handleMultimap(memberState, count, config, ((MultiMapService) service).getStats(), longInstanceNames);
            } else if (service instanceof QueueService) {
                count = handleQueue(memberState, count, config, ((QueueService) service).getStats(), longInstanceNames);
            } else if (service instanceof TopicService) {
                count = handleTopic(memberState, count, config, ((TopicService) service).getStats(), longInstanceNames);
            } else if (service instanceof DistributedExecutorService) {
                count = handleExecutorService(memberState, count, config, ((DistributedExecutorService) service).getStats(), longInstanceNames);
            } else if (service instanceof ReplicatedMapService) {
                count = handleReplicatedMap(memberState, count, config, ((ReplicatedMapService) service).getStats(), longInstanceNames);
            }
        }
    }
    WanReplicationService wanReplicationService = instance.node.nodeEngine.getWanReplicationService();
    Map<String, LocalWanStats> wanStats = wanReplicationService.getStats();
    if (wanStats != null) {
        count = handleWan(memberState, count, wanStats, longInstanceNames);
    }
    if (cacheServiceEnabled) {
        ICacheService cacheService = getCacheService();
        for (CacheConfig cacheConfig : cacheService.getCacheConfigs()) {
            if (cacheConfig.isStatisticsEnabled() && count < maxVisibleInstanceCount) {
                CacheStatistics statistics = cacheService.getStatistics(cacheConfig.getNameWithPrefix());
                //is filled.git
                if (statistics != null) {
                    count = handleCache(memberState, count, cacheConfig, statistics, longInstanceNames);
                }
            }
        }
    }
    timedMemberState.setInstanceNames(longInstanceNames);
}
Also used : StatisticsAwareService(com.hazelcast.spi.StatisticsAwareService) CacheConfig(com.hazelcast.config.CacheConfig) Config(com.hazelcast.config.Config) GroupConfig(com.hazelcast.config.GroupConfig) MultiMapService(com.hazelcast.multimap.impl.MultiMapService) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService) QueueService(com.hazelcast.collection.impl.queue.QueueService) WanReplicationService(com.hazelcast.wan.WanReplicationService) CacheStatistics(com.hazelcast.cache.CacheStatistics) TopicService(com.hazelcast.topic.impl.TopicService) ICacheService(com.hazelcast.cache.impl.ICacheService) LocalWanStats(com.hazelcast.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) CacheConfig(com.hazelcast.config.CacheConfig) HashSet(java.util.HashSet)

Example 7 with MultiMapService

use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.

the class MultiMapMigrationOperation method run.

@Override
public void run() throws Exception {
    MultiMapService service = getService();
    service.insertMigratedData(getPartitionId(), map);
}
Also used : MultiMapService(com.hazelcast.multimap.impl.MultiMapService)

Example 8 with MultiMapService

use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.

the class MultiMapOperation 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)

Example 9 with MultiMapService

use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.

the class MultiMapOperation method publishEvent.

public final void publishEvent(EntryEventType eventType, Data key, Object newValue, Object oldValue) {
    MultiMapService multiMapService = getService();
    multiMapService.publishEntryEvent(name, eventType, key, newValue, oldValue);
}
Also used : MultiMapService(com.hazelcast.multimap.impl.MultiMapService)

Example 10 with MultiMapService

use of com.hazelcast.multimap.impl.MultiMapService in project hazelcast by hazelcast.

the class TxnRemoveAllOperation method afterRun.

@Override
public void afterRun() throws Exception {
    long elapsed = Math.max(0, Clock.currentTimeMillis() - begin);
    final MultiMapService service = getService();
    service.getLocalMultiMapStatsImpl(name).incrementRemoves(elapsed);
    if (removed != null) {
        getOrCreateContainer().update();
        for (MultiMapRecord record : removed) {
            publishEvent(EntryEventType.REMOVED, dataKey, null, record.getObject());
        }
    }
}
Also used : MultiMapRecord(com.hazelcast.multimap.impl.MultiMapRecord) MultiMapService(com.hazelcast.multimap.impl.MultiMapService)

Aggregations

MultiMapService (com.hazelcast.multimap.impl.MultiMapService)11 QueueService (com.hazelcast.collection.impl.queue.QueueService)2 DistributedExecutorService (com.hazelcast.executor.impl.DistributedExecutorService)2 MapService (com.hazelcast.map.impl.MapService)2 ReplicatedMapService (com.hazelcast.replicatedmap.impl.ReplicatedMapService)2 TopicService (com.hazelcast.topic.impl.TopicService)2 CacheStatistics (com.hazelcast.cache.CacheStatistics)1 ICacheService (com.hazelcast.cache.impl.ICacheService)1 CardinalityEstimatorService (com.hazelcast.cardinality.impl.CardinalityEstimatorService)1 ClientEndpoint (com.hazelcast.client.ClientEndpoint)1 ListService (com.hazelcast.collection.impl.list.ListService)1 SetService (com.hazelcast.collection.impl.set.SetService)1 AtomicLongService (com.hazelcast.concurrent.atomiclong.AtomicLongService)1 AtomicReferenceService (com.hazelcast.concurrent.atomicreference.AtomicReferenceService)1 CountDownLatchService (com.hazelcast.concurrent.countdownlatch.CountDownLatchService)1 IdGeneratorService (com.hazelcast.concurrent.idgen.IdGeneratorService)1 LockServiceImpl (com.hazelcast.concurrent.lock.LockServiceImpl)1 SemaphoreService (com.hazelcast.concurrent.semaphore.SemaphoreService)1 CacheConfig (com.hazelcast.config.CacheConfig)1 Config (com.hazelcast.config.Config)1