예제 #1
0
 @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;
 }
예제 #2
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;
 }