use of com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator in project hazelcast by hazelcast.
the class CacheGetInvalidationMetaDataOperation method getNamePartitionSequenceList.
private Map<String, List<Map.Entry<Integer, Long>>> getNamePartitionSequenceList(List<Integer> ownedPartitionIds) {
MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator();
Map<String, List<Map.Entry<Integer, Long>>> sequences = new HashMap<String, List<Map.Entry<Integer, Long>>>(ownedPartitionIds.size());
for (String name : names) {
List<Map.Entry<Integer, Long>> mapSequences = new ArrayList<Map.Entry<Integer, Long>>();
for (Integer partitionId : ownedPartitionIds) {
long partitionSequence = metaDataGenerator.currentSequence(name, partitionId);
if (partitionSequence != 0) {
mapSequences.add(new AbstractMap.SimpleEntry<Integer, Long>(partitionId, partitionSequence));
}
}
sequences.put(name, mapSequences);
}
return sequences;
}
use of com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator in project hazelcast by hazelcast.
the class CacheGetInvalidationMetaDataOperation method getPartitionUuidList.
private Map<Integer, UUID> getPartitionUuidList(List<Integer> ownedPartitionIds) {
MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator();
Map<Integer, UUID> partitionUuids = new HashMap<Integer, UUID>(ownedPartitionIds.size());
for (Integer partitionId : ownedPartitionIds) {
UUID uuid = metaDataGenerator.getOrCreateUuid(partitionId);
partitionUuids.put(partitionId, uuid);
}
return partitionUuids;
}
use of com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator in project hazelcast by hazelcast.
the class MapGetInvalidationMetaDataOperation method getPartitionUuidList.
private Map<Integer, UUID> getPartitionUuidList(List<Integer> ownedPartitionIds) {
MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator();
Map<Integer, UUID> partitionUuids = createHashMap(ownedPartitionIds.size());
for (Integer partitionId : ownedPartitionIds) {
UUID uuid = metaDataGenerator.getOrCreateUuid(partitionId);
partitionUuids.put(partitionId, uuid);
}
return partitionUuids;
}
use of com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator in project hazelcast by hazelcast.
the class MapGetInvalidationMetaDataOperation method getNamePartitionSequenceList.
private Map<String, List<Map.Entry<Integer, Long>>> getNamePartitionSequenceList(List<Integer> ownedPartitionIds) {
MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator();
Map<String, List<Map.Entry<Integer, Long>>> sequences = new HashMap<>(ownedPartitionIds.size());
for (String name : mapNames) {
List<Map.Entry<Integer, Long>> mapSequences = new ArrayList<>();
for (Integer partitionId : ownedPartitionIds) {
long partitionSequence = metaDataGenerator.currentSequence(name, partitionId);
if (partitionSequence != 0) {
mapSequences.add(new AbstractMap.SimpleEntry<>(partitionId, partitionSequence));
}
}
sequences.put(name, mapSequences);
}
return sequences;
}
use of com.hazelcast.internal.nearcache.impl.invalidation.MetaDataGenerator in project hazelcast by hazelcast.
the class MapChunk method applyNearCacheState.
private void applyNearCacheState(RecordStore recordStore) {
MetaDataGenerator metaDataGenerator = getPartitionMetaDataGenerator(recordStore);
int partitionId = getPartitionId();
if (partitionUuid != null) {
metaDataGenerator.setUuid(partitionId, partitionUuid);
}
metaDataGenerator.setCurrentSequence(recordStore.getName(), partitionId, currentSequence);
}
Aggregations