@Override
 public void run() {
   final MapServiceContext mapServiceContext = mapService.getMapServiceContext();
   final RecordStore recordStore = mapServiceContext.getRecordStore(getPartitionId(), name);
   values = recordStore.valuesData();
   if (mapContainer.getMapConfig().isStatisticsEnabled()) {
     LocalMapStatsProvider localMapStatsProvider = mapServiceContext.getLocalMapStatsProvider();
     LocalMapStatsImpl localMapStatsImpl = localMapStatsProvider.getLocalMapStatsImpl(name);
     localMapStatsImpl.incrementOtherOperations();
   }
 }
 public void run() {
   int partitionId = getPartitionId();
   recordStore = mapService.getMapServiceContext().getRecordStore(partitionId, name);
   for (int i = 0; i < entries.size(); i++) {
     final RecordInfo recordInfo = recordInfos.get(i);
     final Map.Entry<Data, Data> entry = entries.get(i);
     final Record record = recordStore.putBackup(entry.getKey(), entry.getValue());
     Records.applyRecordInfo(record, recordInfo);
   }
 }
  @Override
  public void run() throws Exception {
    final List<Data> keyValueSequence = this.keyValueSequence;
    if (keyValueSequence == null || keyValueSequence.isEmpty()) {
      return;
    }
    final int partitionId = getPartitionId();
    final MapService mapService = this.mapService;
    final RecordStore recordStore =
        mapService.getMapServiceContext().getRecordStore(partitionId, name);
    for (int i = 0; i < keyValueSequence.size(); i += 2) {
      final Data key = keyValueSequence.get(i);
      final Data dataValue = keyValueSequence.get(i + 1);
      // here object conversion is for interceptors.
      final Object objectValue = mapService.getMapServiceContext().toObject(dataValue);
      final Object previousValue = recordStore.putFromLoad(key, objectValue);

      callAfterPutInterceptors(objectValue);
      publishEntryEvent(key, mapService.getMapServiceContext().toData(previousValue), dataValue);
      publishWanReplicationEvent(key, dataValue, recordStore.getRecord(key));
    }
  }
示例#4
0
 private WriteBehindQueue<DelayedEntry> getWriteBehindQueue(RecordStore recordStore) {
   final WriteBehindStore storeManager = (WriteBehindStore) recordStore.getMapDataStore();
   return storeManager.getWriteBehindQueue();
 }