Search in sources :

Example 16 with ReplicatedRecordStore

use of com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore 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;
        }
    }
}
Also used : ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService)

Example 17 with ReplicatedRecordStore

use of com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore in project hazelcast by hazelcast.

the class MergeOperation method run.

@Override
public void run() {
    ReplicatedMapService service = getService();
    ReplicatedRecordStore recordStore = service.getReplicatedRecordStore(name, true, getPartitionId());
    for (ReplicatedMapMergeTypes<Object, Object> mergingEntry : mergingEntries) {
        if (recordStore.merge(mergingEntry, mergePolicy)) {
            hasMergedValues = true;
        }
    }
}
Also used : ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService)

Example 18 with ReplicatedRecordStore

use of com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore in project hazelcast by hazelcast.

the class ReplicatedMapAbstractTest method getReplicatedRecord.

@SuppressWarnings("unchecked")
protected <K, V> ReplicatedRecord<K, V> getReplicatedRecord(ReplicatedMap<K, V> map, K key) throws Exception {
    ReplicatedMapProxy<K, V> proxy = (ReplicatedMapProxy<K, V>) map;
    ReplicatedMapService service = (ReplicatedMapService) REPLICATED_MAP_SERVICE.get(proxy);
    ReplicatedRecordStore store = service.getReplicatedRecordStore(map.getName(), false, key);
    return store.getReplicatedRecord(key);
}
Also used : ReplicatedMapProxy(com.hazelcast.replicatedmap.impl.ReplicatedMapProxy) ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService)

Example 19 with ReplicatedRecordStore

use of com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore in project hazelcast by hazelcast.

the class ReplicatedMapTtlTest method assertAllTtlSchedulersEmpty.

private static void assertAllTtlSchedulersEmpty(ReplicatedMap map) {
    String mapName = map.getName();
    ReplicatedMapProxy replicatedMapProxy = (ReplicatedMapProxy) map;
    ReplicatedMapService service = (ReplicatedMapService) replicatedMapProxy.getService();
    Collection<ReplicatedRecordStore> stores = service.getAllReplicatedRecordStores(mapName);
    for (ReplicatedRecordStore store : stores) {
        assertTrue(((SecondsBasedEntryTaskScheduler) ((AbstractBaseReplicatedRecordStore) store).getTtlEvictionScheduler()).isEmpty());
    }
}
Also used : AbstractBaseReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.AbstractBaseReplicatedRecordStore) ReplicatedMapProxy(com.hazelcast.replicatedmap.impl.ReplicatedMapProxy) ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) AbstractBaseReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.AbstractBaseReplicatedRecordStore) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService)

Example 20 with ReplicatedRecordStore

use of com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore in project hazelcast by hazelcast.

the class ClientReplicatedMapTest method assertAllTtlSchedulersEmpty.

private static void assertAllTtlSchedulersEmpty(ReplicatedMap map) {
    String mapName = map.getName();
    ReplicatedMapProxy replicatedMapProxy = (ReplicatedMapProxy) map;
    ReplicatedMapService service = (ReplicatedMapService) replicatedMapProxy.getService();
    Collection<ReplicatedRecordStore> stores = service.getAllReplicatedRecordStores(mapName);
    for (ReplicatedRecordStore store : stores) {
        assertTrue(((SecondsBasedEntryTaskScheduler) ((AbstractBaseReplicatedRecordStore) store).getTtlEvictionScheduler()).isEmpty());
    }
}
Also used : AbstractBaseReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.AbstractBaseReplicatedRecordStore) ReplicatedMapProxy(com.hazelcast.replicatedmap.impl.ReplicatedMapProxy) AbstractBaseReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.AbstractBaseReplicatedRecordStore) ReplicatedRecordStore(com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore) ReplicatedMapService(com.hazelcast.replicatedmap.impl.ReplicatedMapService)

Aggregations

ReplicatedRecordStore (com.hazelcast.replicatedmap.impl.record.ReplicatedRecordStore)38 ReplicatedMapService (com.hazelcast.replicatedmap.impl.ReplicatedMapService)19 ReplicatedRecord (com.hazelcast.replicatedmap.impl.record.ReplicatedRecord)7 ArrayList (java.util.ArrayList)7 Data (com.hazelcast.internal.serialization.Data)5 ILogger (com.hazelcast.logging.ILogger)4 Nonnull (javax.annotation.Nonnull)4 Address (com.hazelcast.cluster.Address)3 SerializationService (com.hazelcast.internal.serialization.SerializationService)3 ReplicatedMapProxy (com.hazelcast.replicatedmap.impl.ReplicatedMapProxy)3 Map (java.util.Map)3 ReplicatedMapConfig (com.hazelcast.config.ReplicatedMapConfig)2 LocalReplicatedMapStatsImpl (com.hazelcast.internal.monitor.impl.LocalReplicatedMapStatsImpl)2 DataCollection (com.hazelcast.map.impl.DataCollection)2 PartitionContainer (com.hazelcast.replicatedmap.impl.PartitionContainer)2 AbstractBaseReplicatedRecordStore (com.hazelcast.replicatedmap.impl.record.AbstractBaseReplicatedRecordStore)2 AbstractReplicatedRecordStore (com.hazelcast.replicatedmap.impl.record.AbstractReplicatedRecordStore)2 RecordMigrationInfo (com.hazelcast.replicatedmap.impl.record.RecordMigrationInfo)2 BitSet (java.util.BitSet)2 Member (com.hazelcast.cluster.Member)1