Class InvocableMapHelper.RoutingBinaryEntry

java.lang.Object
com.tangosol.util.InvocableMapHelper.RoutingMapTriggerEntry
com.tangosol.util.InvocableMapHelper.RoutingBinaryEntry
All Implemented Interfaces:
BinaryEntry, InvocableMap.Entry, MapTrigger.Entry, QueryMap.Entry, Map.Entry
Enclosing class:
InvocableMapHelper

protected static class InvocableMapHelper.RoutingBinaryEntry extends InvocableMapHelper.RoutingMapTriggerEntry implements BinaryEntry
BinaryEntry wrapper that routes the getValue()/getBinaryValue() calls onto getOriginalValue()/getOriginalBinaryValue().
  • Constructor Details

    • RoutingBinaryEntry

      protected RoutingBinaryEntry(BinaryEntry entry)
      Construct a routing entry.
      Parameters:
      entry - the underlying BinaryEntry
  • Method Details

    • getBinaryKey

      public Binary getBinaryKey()
      Return a raw binary key for this entry.
      Specified by:
      getBinaryKey in interface BinaryEntry
      Returns:
      a raw binary key for this entry
    • getBinaryValue

      public Binary getBinaryValue()
      Return an OriginalBinaryValue from the underlying entry.
      Specified by:
      getBinaryValue in interface BinaryEntry
      Returns:
      a raw binary value for this entry; null if the value does not exist
    • getSerializer

      public Serializer getSerializer()
      Return a Serializer that is used to serialize/deserialize this entry.
      Specified by:
      getSerializer in interface BinaryEntry
      Returns:
      a Serializer that is used to serialize/deserialize this entry
    • isReadOnly

      public boolean isReadOnly()
      Check whether this BinaryEntry allows data modification operations.
      Specified by:
      isReadOnly in interface BinaryEntry
      Returns:
      true iff the entry is "read-only"
    • getContext

      public BackingMapManagerContext getContext()
      Description copied from interface: BinaryEntry
      Return the context this entry operates within.

      Note: This method is a shortcut for the getBackingMapContext.getManagerContext() call.

      Specified by:
      getContext in interface BinaryEntry
      Returns:
      the BackingMapManagerContext for this entry
      Throws:
      UnsupportedOperationException
    • updateBinaryValue

      public void updateBinaryValue(Binary binValue)
      Description copied from interface: BinaryEntry
      Update the binary value for this entry.

      Passing a non-null binary is functionally equivalent to:

         setValue(getContext().getValueFromInternalConverter().convert(binValue));
       
      Passing null value is functionally equivalent to removing the entry.
         remove(false);
       
      Specified by:
      updateBinaryValue in interface BinaryEntry
      Parameters:
      binValue - new binary value to be stored in this entry or null
      Throws:
      UnsupportedOperationException
    • updateBinaryValue

      public void updateBinaryValue(Binary binValue, boolean fSynthetic)
      Description copied from interface: BinaryEntry
      Update the binary value for this entry.

      Passing a non-null binary is functionally equivalent to:

         setValue(getContext().getValueFromInternalConverter().convert(binValue));
       
      Passing null value is functionally equivalent to removing the entry.
         remove(false);
       
      This method will bypass any CacheStore or BinaryEntryStore implementations, iff fSynthetic is true and the backing map associated with this entry is a ReadWriteBackingMap.
      Specified by:
      updateBinaryValue in interface BinaryEntry
      Parameters:
      binValue - new binary value to be stored in this entry or null
      fSynthetic - pass true only if the insertion into or modification of the Map should be treated as a synthetic event
      Throws:
      UnsupportedOperationException
    • getOriginalBinaryValue

      public Binary getOriginalBinaryValue()
      Description copied from interface: BinaryEntry
      Return a raw original binary value for this entry.
      Specified by:
      getOriginalBinaryValue in interface BinaryEntry
      Returns:
      a raw original binary value for this entry; null if the original value did not exist
      Throws:
      UnsupportedOperationException
    • getBackingMap

      public ObservableMap getBackingMap()
      Description copied from interface: BinaryEntry
      Obtain a reference to the backing map that this Entry corresponds to. The returned Map should be used in a read-only manner.

      Note: This method is a shortcut for the getBackingMapContext().getBackingMap() call. As of Coherence 3.7, the returned type has been narrowed to ObservableMap.

      Specified by:
      getBackingMap in interface BinaryEntry
      Returns:
      the backing map reference; null if the entry does not have any backing map association
      Throws:
      UnsupportedOperationException
    • getBackingMapContext

      public BackingMapContext getBackingMapContext()
      Description copied from interface: BinaryEntry
      Obtain a reference to the backing map context for the cache that this Entry corresponds to.
      Specified by:
      getBackingMapContext in interface BinaryEntry
      Returns:
      the corresponding BackingMapContext; null if the entry does not have any backing map association
      Throws:
      UnsupportedOperationException
    • expire

      public void expire(long cMillis)
      Description copied from interface: BinaryEntry
      Update the entry with the specified expiry delay.

      Note: this method only has an effect only if the associated backing map implements the CacheMap interface

      Specified by:
      expire in interface BinaryEntry
      Parameters:
      cMillis - the number of milliseconds until the entry will expire; pass CacheMap.EXPIRY_DEFAULT to use the default expiry setting; pass CacheMap.EXPIRY_NEVER to indicate that the entry should never expire
      Throws:
      UnsupportedOperationException
    • getExpiry

      public long getExpiry()
      Description copied from interface: BinaryEntry
      Return the number of milliseconds remaining before the specified entry is scheduled to expire. If the BinaryEntry.expire(long) method has been called, the returned value will reflect the requested expiry delay. Otherwise if the entry exists, the returned value will represent the time remaining until the entry expires (or CacheMap.EXPIRY_NEVER if the entry will never expire). If the entry does not exist, CacheMap.EXPIRY_DEFAULT will be returned.

      This method will make a "best effort" attempt to determine the expiry time remaining. In some cases, it may not be possible to determine the expiry (e.g. the backing-map does not implement the CacheMap interface), in which case CacheMap.EXPIRY_DEFAULT will be returned.

      Specified by:
      getExpiry in interface BinaryEntry
      Returns:
      the number of milliseconds remaining before the specified entry expires
      Throws:
      UnsupportedOperationException