|
Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
com.tangosol.util.Base
com.tangosol.net.cache.BackingMapBinaryEntry
public class BackingMapBinaryEntry
An implementation of the BinaryEntry interface that is based on specified binary key, binary value and BackingMapManagerContext. Analogous to the MapTrigger.Entry, it represents a pending change to an Entry that is about to committed to the underlying Map. For example, the original binary value of null indicates pending insert (a non-existing entry), while the binary value of null represents a pending remove operation.
| Field Summary | |
|---|---|
protected Binary |
m_binKeyThe Binary key. |
protected Binary |
m_binValueThe Binary value. |
protected Binary |
m_binValueOrigThe original Binary value. |
protected BackingMapManagerContext |
m_ctxThe backing map context. |
protected java.lang.Object |
m_oKeyLazily converted key in Object format. |
protected java.lang.Object |
m_oValueLazily converted value in Object format. |
protected java.lang.Object |
m_oValueOrigLazily converted original value in Object format. |
protected static Binary |
NO_VALUEMarker object used to indicate that a lazily converted value has not yet been calculated. |
| Constructor Summary | |
|---|---|
BackingMapBinaryEntry(Binary binKey, Binary binValue, Binary binValueOrig, BackingMapManagerContext ctx)Construct a BackingMapBinaryEntry with the specified binary key, values and BackingMapManagerContext. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)Compares the specified object with this entry for equality. |
java.lang.Object |
extract(ValueExtractor extractor)Extract a value out of the Entry's value. |
java.util.Map |
getBackingMap()Obtain a reference to the backing map that this Entry corresponds to. |
Binary |
getBinaryKey()Return a raw binary key for this entry. |
Binary |
getBinaryValue()Return a raw binary value for this entry. |
BackingMapManagerContext |
getContext()Return the context this entry operates within. |
java.lang.Object |
getKey()Return the key corresponding to this entry. |
Binary |
getOriginalBinaryValue()Return a raw original binary value for this entry. |
java.lang.Object |
getOriginalValue()Return an original value for this entry. |
Serializer |
getSerializer()Return a Serializer that is used to serialize/deserialize this entry. |
java.lang.Object |
getValue()Return the value corresponding to this entry. |
int |
hashCode()Returns the hash code value for this entry. |
boolean |
isPresent()Determine if this Entry exists in the Map. |
void |
remove(boolean fSynthetic)Remove this Entry from the Map if it is present in the Map. |
java.lang.Object |
setValue(java.lang.Object oValue)Store the value corresponding to this entry. |
void |
setValue(java.lang.Object oValue, boolean fSynthetic)Store the value corresponding to this entry. |
java.lang.String |
toString()Render the entry as a String. |
void |
update(ValueUpdater updater, java.lang.Object oValue)Update the Entry's value. |
void |
updateBinaryValue(Binary binValue)Update the binary value for this entry. |
| Field Detail |
|---|
protected BackingMapManagerContext m_ctx
protected Binary m_binKey
protected Binary m_binValue
protected Binary m_binValueOrig
protected java.lang.Object m_oKey
protected java.lang.Object m_oValue
protected java.lang.Object m_oValueOrig
protected static final Binary NO_VALUE
| Constructor Detail |
|---|
public BackingMapBinaryEntry(Binary binKey,
Binary binValue,
Binary binValueOrig,
BackingMapManagerContext ctx)
binKey - the Binary keybinValue - the Binary value; could be null representing a non-existing entrybinValueOrig - an origianl Binary value; could be null representing an insert operationctx - a BackingMapManagerContext| Method Detail |
|---|
public Binary getBinaryKey()
getBinaryKey in interface BinaryEntrypublic Binary getBinaryValue()
getBinaryValue in interface BinaryEntrypublic Binary getOriginalBinaryValue()
getOriginalBinaryValue in interface BinaryEntrypublic java.lang.Object getKey()
InvocableMap.Entry.isPresent(), and to create the entry for the key, use InvocableMap.Entry.setValue(java.lang.Object).getKey in interface InvocableMap.EntrygetKey in interface java.util.Map.Entrypublic java.lang.Object getValue()
InvocableMap.Entry.isPresent(). Note: any modifications to the value retrieved using this method are not guaranteed to persist unless followed by a InvocableMap.Entry.setValue(java.lang.Object) or InvocableMap.Entry.update(com.tangosol.util.ValueUpdater, java.lang.Object) call.getValue in interface InvocableMap.EntrygetValue in interface java.util.Map.Entrypublic java.lang.Object getOriginalValue()
getOriginalValue in interface BinaryEntrypublic java.lang.Object setValue(java.lang.Object oValue)
setValue in interface InvocableMap.EntrysetValue in interface java.util.Map.EntryoValue - the new value for this Entry
public void setValue(java.lang.Object oValue,
boolean fSynthetic)
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.setValue in interface InvocableMap.EntryoValue - 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 updateBinaryValue(Binary binValue)
setValue(getContext().getValueFromInternalConverter().convert(binValue));Passing null value is functionally equivalent to removing the entry.
remove(false);
updateBinaryValue in interface BinaryEntrybinValue - a raw binary value to for this entry or nullpublic Serializer getSerializer()
Serializer that is used to serialize/deserialize this entry.getSerializer in interface BinaryEntrySerializer that is used to serialize/deserialize this entrypublic BackingMapManagerContext getContext()
getContext in interface BinaryEntrypublic java.util.Map getBackingMap()
getBackingMap in interface BinaryEntry
public void update(ValueUpdater updater,
java.lang.Object oValue)
Object oTarget = entry.getValue(); updater.update(oTarget, oValue); entry.setValue(oTarget, 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.Entryupdater - a ValueUpdater used to modify the Entry's valueoValue - the new value for this Entrypublic boolean isPresent()
InvocableMap.Entry.setValue(java.lang.Object) or InvocableMap.Entry.setValue(java.lang.Object). If the Entry is present, it can be destroyed by calling InvocableMap.Entry.remove(boolean).isPresent in interface InvocableMap.Entrypublic void remove(boolean fSynthetic)
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()).remove in interface InvocableMap.EntryfSynthetic - pass true only if the removal from the Map should be treated as a synthetic eventpublic java.lang.Object extract(ValueExtractor extractor)
extract in interface QueryMap.Entryextractor - a ValueExtractor to apply to the Entry's valuepublic boolean equals(java.lang.Object o)
equals in interface java.util.Map.Entryo - object to be compared for equality with this entrypublic int hashCode()
hashCode in interface java.util.Map.EntryObject.hashCode(), Object.equals(Object), Map.Entry.equals(Object)public java.lang.String toString()
|
Oracle® Coherence Java API Reference Release 3.6.1.0 E18814-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||