Class PendingPollEvent

    • Constructor Detail

      • PendingPollEvent

        public PendingPollEvent​(IEvent event)

        Constructor for PendingPollEvent.

        Parameters:
        event - a IEvent object.
    • Method Detail

      • getEventId

        public int getEventId()

        getEventId

        Specified by:
        getEventId in class PollEvent
        Returns:
        a int.
      • addPending

        public void addPending​(Runnable r)

        addPending

        Parameters:
        r - a Runnable object.
      • getEvent

        public IEvent getEvent()

        getEvent

        Returns:
        a IEvent object.
      • isPending

        public boolean isPending()

        isPending

        Returns:
        a boolean.
      • complete

        public void complete​(IEvent e)
        Changes the state of this event from "pending" to "not pending". It is important that this call be thread-safe and idempotent because it may be invoked by multiple DefaultPollContext.onEvent(IEvent) threads.
        Parameters:
        e - a IEvent object.
      • processPending

        public void processPending()
        Synchronously processes all pending tasks attached to this event. It is important that this call be thread-safe and idempotent because it may be invoked by multiple DefaultPollContext#onEvent(Event) threads.