Class EventAdapter

    • Constructor Detail

      • EventAdapter

        public EventAdapter()
        No-arg constructor.
      • EventAdapter

        public EventAdapter​(ClusterNode node,
                            String msg,
                            int type)
        Creates event based with given parameters.
        Parameters:
        node - Event initiator node.
        msg - Optional message.
        type - Event type.
    • Method Detail

      • id

        public IgniteUuid id()
        Gets globally unique ID of this event.
        Specified by:
        id in interface Event
        Returns:
        Globally unique ID of this event.
        See Also:
        Event.localOrder()
      • localOrder

        public long localOrder()
        Gets locally unique ID that is atomically incremented for each event. Unlike global 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.

        Specified by:
        localOrder in interface Event
        Returns:
        Locally unique ID that is atomically incremented for each new event.
        See Also:
        Event.id()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • node

        public void node​(ClusterNode node)
        Sets node where even is occurred (i.e. node local to the event).
        Parameters:
        node - Node.
      • message

        public void message​(@Nullable
                            @Nullable String msg)
        Sets optional event message.
        Parameters:
        msg - Optional event message.
      • type

        public void type​(int type)
        Sets event type.
        Parameters:
        type - Event type.
      • node

        public ClusterNode node()
        Node where event occurred and was recorded
        Specified by:
        node in interface Event
        Returns:
        node where event occurred and was recorded.
      • message

        @Nullable
        public @Nullable String message()
        Gets optional message for this event.
        Specified by:
        message in interface Event
        Returns:
        Optional (can be null) message for this event.
      • type

        public int type()
        Gets type of this event. All system event types are defined in 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.

        Specified by:
        type in interface Event
        Returns:
        Event's type.
        See Also:
        EventType
      • timestamp

        public long timestamp()
        Gets event timestamp. Timestamp is local to the node on which this event was produced. Note that more than one event can be generated with the same timestamp. For ordering purposes use Event.localOrder() instead.
        Specified by:
        timestamp in interface Event
        Returns:
        Event timestamp.
      • name

        public String name()
        Gets event type name.
        Specified by:
        name in interface Event
        Returns:
        Event type name.
      • shortDisplay

        public String shortDisplay()
        Gets a shortened version of toString() result. Suitable for humans to read.
        Specified by:
        shortDisplay in interface Event
        Returns:
        Shortened version of toString() result.