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().
-
-
Field Summary
-
Fields inherited from class com.tangosol.util.InvocableMapHelper.RoutingMapTriggerEntry
m_entry
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
RoutingBinaryEntry(BinaryEntry entry)
Construct a routing entry.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
expire(long cMillis)
Update the entry with the specified expiry delay.ObservableMap
getBackingMap()
Obtain a reference to the backing map that this Entry corresponds to.BackingMapContext
getBackingMapContext()
Obtain a reference to thebacking map context
for the cache that this Entry corresponds to.Binary
getBinaryKey()
Return a raw binary key for this entry.Binary
getBinaryValue()
Return an OriginalBinaryValue from the underlying entry.BackingMapManagerContext
getContext()
Return the context this entry operates within.long
getExpiry()
Return the number of milliseconds remaining before the specified entry is scheduled to expire.Binary
getOriginalBinaryValue()
Return a raw original binary value for this entry.Serializer
getSerializer()
Return aSerializer
that is used to serialize/deserialize this entry.boolean
isReadOnly()
Check whether this BinaryEntry allows data modification operations.void
updateBinaryValue(Binary binValue)
Update the binary value for this entry.void
updateBinaryValue(Binary binValue, boolean fSynthetic)
Update the binary value for this entry.-
Methods inherited from class com.tangosol.util.InvocableMapHelper.RoutingMapTriggerEntry
extract, getKey, getOriginalValue, getValue, isOriginalPresent, isPresent, isSynthetic, remove, setValue, setValue, update
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.tangosol.util.BinaryEntry
getAssociatedEntry, getAssociatedEntry, getIndexMap, getKeyPartition, getOriginalValue, isValueChanged, isValueLoaded, isValueRemoved, isValueUpdated, remove, setValue
-
Methods inherited from interface com.tangosol.util.InvocableMap.Entry
asBinaryEntry, getKey, getValue, getValue, getValue, isPresent, isSynthetic, setValue, update
-
Methods inherited from interface com.tangosol.util.QueryMap.Entry
extract, extractFromKey, extractFromValue
-
-
-
-
Constructor Detail
-
RoutingBinaryEntry
protected RoutingBinaryEntry(BinaryEntry entry)
Construct a routing entry.- Parameters:
entry
- the underlying BinaryEntry
-
-
Method Detail
-
getBinaryKey
public Binary getBinaryKey()
Return a raw binary key for this entry.- Specified by:
getBinaryKey
in interfaceBinaryEntry
- Returns:
- a raw binary key for this entry
-
getBinaryValue
public Binary getBinaryValue()
Return an OriginalBinaryValue from the underlying entry.- Specified by:
getBinaryValue
in interfaceBinaryEntry
- Returns:
- a raw binary value for this entry; null if the value does not exist
-
getSerializer
public Serializer getSerializer()
Return aSerializer
that is used to serialize/deserialize this entry.- Specified by:
getSerializer
in interfaceBinaryEntry
- 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 interfaceBinaryEntry
- 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 interfaceBinaryEntry
- 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 interfaceBinaryEntry
- 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 anyCacheStore
orBinaryEntryStore
implementations, iff fSynthetic is true and the backing map associated with this entry is a ReadWriteBackingMap.- Specified by:
updateBinaryValue
in interfaceBinaryEntry
- Parameters:
binValue
- new binary value to be stored in this entry or nullfSynthetic
- 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 interfaceBinaryEntry
- 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 interfaceBinaryEntry
- 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 thebacking map context
for the cache that this Entry corresponds to.- Specified by:
getBackingMapContext
in interfaceBinaryEntry
- 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 interfaceBinaryEntry
- Parameters:
cMillis
- the number of milliseconds until the entry will expire; passCacheMap.EXPIRY_DEFAULT
to use the default expiry setting; passCacheMap.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 theBinaryEntry.expire(long)
method has been called, the returned value will reflect the requested expiry delay. Otherwise if the entryexists
, the returned value will represent the time remaining until the entry expires (orCacheMap.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 caseCacheMap.EXPIRY_DEFAULT
will be returned.- Specified by:
getExpiry
in interfaceBinaryEntry
- Returns:
- the number of milliseconds remaining before the specified entry expires
- Throws:
UnsupportedOperationException
-
-