|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public static interface InvocableMap.Entry
An InvocableMap.Entry contains additional information and exposes additional operations that the basic Map.Entry does not. It allows non-existent entries to be represented, thus allowing their optional creation. It allows existent entries to be removed from the Map. It supports a number of optimizations that can ultimately be mapped through to indexes and other data structures of the underlying Map.
Method Summary | |
---|---|
java.lang.Object |
getKey() Return the key corresponding to this entry. |
java.lang.Object |
getValue() Return the value corresponding to 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. |
void |
update(ValueUpdater updater, java.lang.Object oValue) Update the Entry's value. |
Methods inherited from interface com.tangosol.util.QueryMap.Entry |
---|
extract |
Methods inherited from interface java.util.Map.Entry |
---|
equals, hashCode |
Method Detail |
---|
java.lang.Object getKey()
isPresent()
, and to create the entry for the key, use setValue(java.lang.Object)
.getKey
in interface java.util.Map.Entry
java.lang.Object getValue()
isPresent()
.
Note: any modifications to the value retrieved using this method are not guaranteed to persist unless followed by a setValue(java.lang.Object)
or update(com.tangosol.util.ValueUpdater, java.lang.Object)
call.
getValue
in interface java.util.Map.Entry
java.lang.Object setValue(java.lang.Object oValue)
setValue
in interface java.util.Map.Entry
oValue
- the new value for this Entryvoid setValue(java.lang.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.
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 eventvoid 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.
updater
- a ValueUpdater used to modify the Entry's valueoValue
- the new value for this Entryboolean isPresent()
setValue(Object)
or setValue(Object, boolean)
. If the Entry is present, it can be destroyed by calling remove(boolean)
.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()).
fSynthetic
- pass true only if the removal from the Map should be treated as a synthetic event
|
Oracle® Coherence Java API Reference Release 3.7.1.0 E22843-01 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |