public class GridEventAdapter extends Object implements GridEvent
| Constructor and Description |
|---|
GridEventAdapter()
No-arg constructor.
|
GridEventAdapter(GridNode node,
String msg,
int type)
Creates event based with given parameters.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(GridEvent o) |
boolean |
equals(Object o) |
int |
hashCode() |
GridUuid |
id()
Gets globally unique ID of this event.
|
long |
localOrder()
Gets locally unique ID that is atomically incremented for each event.
|
String |
message()
Gets optional message for this event.
|
void |
message(String msg)
Sets optional event message.
|
String |
name()
Gets event type name.
|
GridNode |
node()
Node where event occurred and was recorded
|
void |
node(GridNode node)
Sets node where even is occurred (i.e.
|
String |
shortDisplay()
Gets a shortened version of
toString() result. |
long |
timestamp()
Gets event timestamp.
|
String |
toString() |
int |
type()
Gets type of this event.
|
void |
type(int type)
Sets event type.
|
public int compareTo(GridEvent o)
compareTo in interface Comparable<GridEvent>public GridUuid id()
id in interface GridEventGridEvent.localOrder()public long localOrder()
GridEvent.id() this local ID can be used for ordering events on this node.
Note that for performance considerations GridGain doesn't order events globally.
localOrder in interface GridEventGridEvent.id()public void node(GridNode node)
node - Node.public void message(@Nullable String msg)
msg - Optional event message.public void type(int type)
type - Event type.public GridNode node()
public int type()
GridEventType.
NOTE: all types in range from 1 to 1000 are reserved for internal GridGain events and should not be used by user-defined events.
type in interface GridEventGridEventTypepublic long timestamp()
GridEvent.localOrder() instead.public String name()
public String shortDisplay()
toString() result. Suitable for humans to read.shortDisplay in interface GridEventtoString() result.Copyright © 2014. All rights reserved.