public class EventAdapter extends Object implements Event
Constructor and Description |
---|
EventAdapter()
No-arg constructor.
|
EventAdapter(ClusterNode node,
@Nullable String msg,
int type)
Creates event based with given parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Event o) |
boolean |
equals(Object o) |
int |
hashCode() |
IgniteUuid |
id()
Gets globally unique ID of this event.
|
long |
localOrder()
Gets locally unique ID that is atomically incremented for each event.
|
@Nullable String |
message()
Gets optional message for this event.
|
void |
message(@Nullable String msg)
Sets optional event message.
|
String |
name()
Gets event type name.
|
ClusterNode |
node()
Node where event occurred and was recorded
|
void |
node(ClusterNode node)
Sets node where even is occurred (i.e. node local to the event).
|
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 EventAdapter()
public EventAdapter(ClusterNode node, @Nullable @Nullable String msg, int type)
msg
- Optional message.type
- Event type.public int compareTo(Event o)
compareTo
in interface Comparable<Event>
public IgniteUuid id()
id
in interface Event
Event.localOrder()
public long localOrder()
Event.id()
this local ID can be used for ordering events on this node.
Note that for performance considerations Ignite doesn't order events globally.
localOrder
in interface Event
Event.id()
public void node(ClusterNode node)
node
- Node.public void message(@Nullable @Nullable String msg)
msg
- Optional event message.public void type(int type)
type
- Event type.public ClusterNode node()
@Nullable public @Nullable String message()
public int type()
EventType
.
NOTE: all types in range from 1 to 1000 are reserved for internal Ignite events and should not be used by user-defined events.
public long timestamp()
Event.localOrder()
instead.public String name()
public String shortDisplay()
toString()
result. Suitable for humans to read.shortDisplay
in interface Event
toString()
result.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024