public IdentifiedDataSerializable createNew(Integer arg) { return new PutAllOperation(); } };
private void put(Data dataKey, Data dataValue) { Object oldValue = putToRecordStore(dataKey, dataValue); dataValue = getValueOrPostProcessedValue(dataKey, dataValue); mapServiceContext.interceptAfterPut(name, dataValue); if (hasMapListener) { EntryEventType eventType = (oldValue == null ? ADDED : UPDATED); mapEventPublisher.publishEvent(getCallerAddress(), name, eventType, dataKey, oldValue, dataValue); } if (hasWanReplication) { publishWanUpdate(dataKey, dataValue); } if (hasBackups) { Record record = recordStore.getRecord(dataKey); RecordInfo replicationInfo = buildRecordInfo(record); backupRecordInfos.add(replicationInfo); } evict(dataKey); if (hasInvalidation) { invalidationKeys.add(dataKey); } }
@Override public void run() { hasMapListener = mapEventPublisher.hasEventListener(name); hasWanReplication = mapContainer.isWanReplicationEnabled(); hasBackups = hasBackups(); hasInvalidation = mapContainer.hasInvalidationListener(); if (hasBackups) { backupRecordInfos = new ArrayList<RecordInfo>(mapEntries.size()); } if (hasInvalidation) { invalidationKeys = new ArrayList<Data>(mapEntries.size()); } for (int i = 0; i < mapEntries.size(); i++) { put(mapEntries.getKey(i), mapEntries.getValue(i)); } }
private Data getValueOrPostProcessedValue(Data dataKey, Data dataValue) { if (!isPostProcessing(recordStore)) { return dataValue; } Record record = recordStore.getRecord(dataKey); return mapServiceContext.toData(record.getValue()); }
@Override public void afterRun() throws Exception { invalidateNearCache(invalidationKeys); super.afterRun(); }
private void put(Data dataKey, Data dataValue) { Object oldValue = putToRecordStore(dataKey, dataValue); dataValue = getValueOrPostProcessedValue(dataKey, dataValue); mapServiceContext.interceptAfterPut(name, dataValue); if (hasMapListener) { EntryEventType eventType = (oldValue == null ? ADDED : UPDATED); mapEventPublisher.publishEvent(getCallerAddress(), name, eventType, dataKey, oldValue, dataValue); } if (hasWanReplication) { publishWanUpdate(dataKey, dataValue); } if (hasBackups) { Record record = recordStore.getRecord(dataKey); RecordInfo replicationInfo = buildRecordInfo(record); backupRecordInfos.add(replicationInfo); } evict(dataKey); if (hasInvalidation) { invalidationKeys.add(dataKey); } }
@Override public void run() { hasMapListener = mapEventPublisher.hasEventListener(name); hasWanReplication = mapContainer.isWanReplicationEnabled(); hasBackups = hasBackups(); hasInvalidation = mapContainer.hasInvalidationListener(); if (hasBackups) { backupRecordInfos = new ArrayList<RecordInfo>(mapEntries.size()); } if (hasInvalidation) { invalidationKeys = new ArrayList<Data>(mapEntries.size()); } for (int i = 0; i < mapEntries.size(); i++) { put(mapEntries.getKey(i), mapEntries.getValue(i)); } }
private Data getValueOrPostProcessedValue(Data dataKey, Data dataValue) { if (!isPostProcessing(recordStore)) { return dataValue; } Record record = recordStore.getRecord(dataKey); return mapServiceContext.toData(record.getValue()); }
@Override public void afterRun() throws Exception { invalidateNearCache(invalidationKeys); super.afterRun(); }
@Override public MapOperation createPutAllOperation(String name, MapEntries mapEntries) { return new PutAllOperation(name, mapEntries); }
public IdentifiedDataSerializable createNew(Integer arg) { return new PutAllOperation(); } };
@Override public MapOperation createPutAllOperation(String name, MapEntries mapEntries) { return new PutAllOperation(name, mapEntries); }
@Override public Operation createPartitionOperation(int partitionId) { for (int i = 0; i < partitions.length; i++) { if (partitions[i] == partitionId) { return new PutAllOperation(name, mapEntries[i]); } } throw new IllegalArgumentException("Unknown partitionId " + partitionId + " (" + Arrays.toString(partitions) + ")"); }
@Override public Operation createPartitionOperation(int partitionId) { for (int i = 0; i < partitions.length; i++) { if (partitions[i] == partitionId) { return new PutAllOperation(name, mapEntries[i]); } } throw new IllegalArgumentException("Unknown partitionId " + partitionId + " (" + Arrays.toString(partitions) + ")"); }