|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
java.util.EventObject
com.tangosol.util.MapEvent
public class MapEvent
An event which indicates that the content of a map has changed:
A MapEvent object is sent as an argument to the MapListener interface methods. Null values may be provided for the old and the new values.
| Field Summary | |
|---|---|
static int |
ENTRY_DELETEDThis event indicates that an entry has been removed from the map. |
static int |
ENTRY_INSERTEDThis event indicates that an entry has been added to the map. |
static int |
ENTRY_UPDATEDThis event indicates that an entry has been updated in the map. |
protected int |
m_nIdThe event's id. |
protected java.lang.Object |
m_oKeyA key. |
protected java.lang.Object |
m_oValueNewA new value. |
protected java.lang.Object |
m_oValueOldA previous value. |
| Fields inherited from class java.util.EventObject |
|---|
source |
| Constructor Summary | |
|---|---|
MapEvent(ObservableMap map, int nId, java.lang.Object oKey, java.lang.Object oValueOld, java.lang.Object oValueNew)Constructs a new MapEvent. |
|
| Method Summary | |
|---|---|
void |
dispatch(Listeners listeners)Dispatch this event to the specified listeners collection. |
void |
dispatch(Listeners listeners, boolean fStrict)Dispatch this event to the specified listeners collection. |
void |
dispatch(MapListener listener)Dispatch this event to the specified MapListener. |
protected java.lang.String |
getDescription()Get the event's description. |
static java.lang.String |
getDescription(int nId)Convert an event ID into a human-readable string. |
int |
getId()Return this event's id. |
java.lang.Object |
getKey()Return a key associated with this event. |
ObservableMap |
getMap()Return an ObservableMap object on which this event has actually occurred. |
java.util.Map.Entry |
getNewEntry()Return a Map Entry that represents the state of the Entry after the change occurred that generated this event. |
java.lang.Object |
getNewValue()Return a new value associated with this event. |
java.util.Map.Entry |
getOldEntry()Return a Map Entry that represents the state of the Entry before the change occurred that generated this event. |
java.lang.Object |
getOldValue()Return an old value associated with this event. |
java.lang.String |
toString()Return a String representation of this MapEvent object. |
| Methods inherited from class java.util.EventObject |
|---|
getSource |
| Field Detail |
|---|
public static final int ENTRY_INSERTED
public static final int ENTRY_UPDATED
public static final int ENTRY_DELETED
protected int m_nId
protected java.lang.Object m_oKey
protected java.lang.Object m_oValueOld
protected java.lang.Object m_oValueNew
| Constructor Detail |
|---|
public MapEvent(ObservableMap map,
int nId,
java.lang.Object oKey,
java.lang.Object oValueOld,
java.lang.Object oValueNew)
map - the ObservableMap object that fired the eventnId - this event's id, one of ENTRY_INSERTED, ENTRY_UPDATED or ENTRY_DELETEDoKey - the key into the mapoValueOld - the old value (for update and delete events)oValueNew - the new value (for insert and update events)| Method Detail |
|---|
public ObservableMap getMap()
public int getId()
public java.lang.Object getKey()
public java.lang.Object getOldValue()
The old value represents a value deleted from or updated in a map. It is always null for "insert" notifications.
public java.lang.Object getNewValue()
The new value represents a new value inserted into or updated in a map. It is always null for "delete" notifications.
public java.util.Map.Entry getOldEntry()
public java.util.Map.Entry getNewEntry()
public java.lang.String toString()
toString in class java.util.EventObjectpublic void dispatch(Listeners listeners)
This call is equivalent to
dispatch(listeners, true);
listeners - the listeners collectionjava.lang.ClassCastException - if any of the targets is not an instance of MapListener interface
public void dispatch(Listeners listeners,
boolean fStrict)
listeners - the listeners collectionfStrict - if true then any RuntimeException thrown by event handlers stops all further event processing and the exception is re-thrown; if false then all exceptions are logged and the process continuesjava.lang.ClassCastException - if any of the targets is not an instance of MapListener interfacepublic void dispatch(MapListener listener)
listener - the listenerprotected java.lang.String getDescription()
public static java.lang.String getDescription(int nId)
nId - an event ID, one of the ENTRY_* enumerated values
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||