protected class ConverterCollections.ConverterMapEvent.ConverterMapEventBinaryEntry extends ConverterCollections.ConverterMapEvent.ConverterMapEventEntry implements BinaryEntry
m_fNewValue
Constructor and Description |
---|
ConverterMapEventBinaryEntry(boolean fNewValue)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
expire(long cMillis)
Update the entry with the specified expiry delay.
|
Object |
extract(ValueExtractor extractor)
Depending upon the type of the ValueExtractor route the call
to the appropriate extract method.
|
ObservableMap |
getBackingMap()
Obtain a reference to the backing map that this Entry corresponds to.
|
BackingMapContext |
getBackingMapContext()
Obtain a reference to the
backing map context
for the cache that this Entry corresponds to. |
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.
|
Object |
getOriginalValue()
Return an original value for this entry.
|
Serializer |
getSerializer()
Return a
Serializer that is used to serialize/deserialize this
entry. |
boolean |
isPresent()
Determine if this Entry exists in the Map.
|
boolean |
isReadOnly()
Check whether this BinaryEntry allows data modification operations.
|
boolean |
isSynthetic()
Determine if this Entry has been synthetically mutated.
|
void |
remove(boolean fSynthetic)
Remove this Entry from the Map if it is present in the Map.
|
void |
setValue(Object oValue,
boolean fSynthetic)
Store the value corresponding to this entry.
|
void |
update(ValueUpdater updater,
Object oValue)
Update the Entry's value.
|
void |
updateBinaryValue(Binary binValue)
Update the binary value for this entry.
|
void |
updateBinaryValue(Binary binValue,
boolean fSynthetic)
Update the binary value for this entry.
|
getBinaryKey, getBinaryValue, getKey, getValue, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBinaryKey, getBinaryValue, isValueChanged, isValueLoaded, isValueRemoved, isValueUpdated
getKey, getValue, getValue, setValue
extractFromKey, extractFromValue
comparingByKey, comparingByKey, comparingByValue, comparingByValue, equals, hashCode
public ConverterMapEventBinaryEntry(boolean fNewValue)
fNewValue
- specifies whether the value represented by
this entry is the new or the old valuepublic boolean isPresent()
InvocableMap.Entry.setValue(Object)
or
InvocableMap.Entry.setValue(Object, boolean)
. If the Entry is present, it can
be destroyed by calling InvocableMap.Entry.remove(boolean)
.isPresent
in interface InvocableMap.Entry
public boolean isSynthetic()
false
if either a non-synthetic update was made or
the entry has not been modified.isSynthetic
in interface InvocableMap.Entry
public void remove(boolean fSynthetic)
This method supports both the operation corresponding to Map.remove(java.lang.Object)
as well as synthetic operations such as eviction. If the
containing Map does not differentiate between the two, then this
method will always be identical to InvocableMap.this.remove(getKey()).
As of Coherence 12.1.2, if fSynthetic is true and the
BackingMap
associated with this entry is a
ReadWriteBackingMap, this method will bypass the
CacheStore
or
BinaryEntryStore
.
remove
in interface BinaryEntry
remove
in interface InvocableMap.Entry
fSynthetic
- pass true only if the removal from the Map should
be treated as a synthetic eventpublic void setValue(Object oValue, boolean fSynthetic)
Unlike the other form of setValue
, this
form does not return the previous value, and as a result may be
significantly less expensive (in terms of cost of execution) for
certain Map implementations.
As of Coherence 12.1.2, if fSynthetic is true and the
BackingMap
associated with this entry is a
ReadWriteBackingMap, this method will bypass the
CacheStore
or
BinaryEntryStore
.
setValue
in interface BinaryEntry
setValue
in interface InvocableMap.Entry
oValue
- the new value for this EntryfSynthetic
- pass true only if the insertion into or
modification of the Map should be treated as a
synthetic eventpublic void update(ValueUpdater updater, Object oValue)
V target = entry.getValue(); updater.update(target, value); entry.setValue(target, false);The benefit of using this method is that it may allow the Entry implementation to significantly optimize the operation, such as for purposes of delta updates and backup maintenance.
update
in interface InvocableMap.Entry
updater
- a ValueUpdater used to modify the Entry's valueoValue
- the new value for this Entrypublic Object extract(ValueExtractor extractor)
extract
in interface QueryMap.Entry
extractor
- the ValueExtractor to pass this Entry or value.public BackingMapManagerContext getContext()
Note: This method is a shortcut for the getBackingMapContext.getManagerContext()
call.
getContext
in interface BinaryEntry
public Serializer getSerializer()
Serializer
that is used to serialize/deserialize this
entry.getSerializer
in interface BinaryEntry
Serializer
that is used to serialize/deserialize this
entrypublic void updateBinaryValue(Binary binValue)
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);
updateBinaryValue
in interface BinaryEntry
binValue
- new binary value to be stored in this entry or nullpublic void updateBinaryValue(Binary binValue, boolean fSynthetic)
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.updateBinaryValue
in interface BinaryEntry
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 eventpublic Object getOriginalValue()
getOriginalValue
in interface BinaryEntry
public Binary getOriginalBinaryValue()
getOriginalBinaryValue
in interface BinaryEntry
public ObservableMap getBackingMap()
Note: This method is a shortcut for the getBackingMapContext().getBackingMap()
call. As of Coherence 3.7, the returned type has been narrowed to
ObservableMap.
getBackingMap
in interface BinaryEntry
public BackingMapContext getBackingMapContext()
backing map context
for the cache that this Entry corresponds to.getBackingMapContext
in interface BinaryEntry
public void expire(long cMillis)
Note: this method only has an effect only if the associated backing map
implements the CacheMap
interface
expire
in interface BinaryEntry
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 expirepublic long getExpiry()
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.
getExpiry
in interface BinaryEntry
public boolean isReadOnly()
isReadOnly
in interface BinaryEntry