Beispiel #1
0
 public void run() {
   SimpleEntryView entryView = (SimpleEntryView) mergingEntry;
   entryView.setKey(mapService.toObject(mergingEntry.getKey()));
   entryView.setValue(mapService.toObject(mergingEntry.getValue()));
   merged = recordStore.merge(dataKey, mergingEntry, mergePolicy);
   if (merged) {
     Record record = recordStore.getRecord(dataKey);
     if (record != null) dataValue = mapService.toData(record.getValue());
   }
 }
 @Override
 public EntryView<K, V> getEntryView(K key) {
   final Data keyData = toData(key);
   MapGetEntryViewRequest request = new MapGetEntryViewRequest(name, keyData);
   SimpleEntryView entryView = invoke(request, keyData);
   if (entryView == null) {
     return null;
   }
   final Data value = (Data) entryView.getValue();
   entryView.setKey(key);
   entryView.setValue(toObject(value));
   return entryView;
 }
Beispiel #3
0
 public EntryView<K, V> getEntryView(K key) {
   if (key == null) {
     throw new NullPointerException(NULL_KEY_IS_NOT_ALLOWED);
   }
   SimpleEntryView<K, V> entryViewInternal =
       (SimpleEntryView) getEntryViewInternal(getService().toData(key, partitionStrategy));
   if (entryViewInternal == null) {
     return null;
   }
   Data value = (Data) entryViewInternal.getValue();
   entryViewInternal.setKey(key);
   entryViewInternal.setValue((V) getService().toObject(value));
   return entryViewInternal;
 }