Interface QueueListener


public interface QueueListener
User: Date: 19/09/12 Time: 15:08 A listener interface for score queue events.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEnqueue(List<ExecutionMessage> messages, int queueSize)
    A callback that will be called when messages are inserted to the queue
    void
    A callback that will be called when messages are in status of failed
    void
    A callback that will be called when messages are required to be persisted in addition to the queue
    void
    onPoll(List<ExecutionMessage> messages, int queueSize)
    A callback that will be called when messages are polled from the queue
    void
    A callback that will be called when messages are in status of terminated
    void
    A callback that will be called when messages are inserted to the queue before they are persisted to the DB
  • Method Details

    • prePersist

      void prePersist(List<ExecutionMessage> messages)
      A callback that will be called when messages are inserted to the queue before they are persisted to the DB
      Parameters:
      messages - the messages that are inserted to the queue
    • onEnqueue

      void onEnqueue(List<ExecutionMessage> messages, int queueSize)
      A callback that will be called when messages are inserted to the queue
      Parameters:
      messages - the messages that are inserted to the queue
      queueSize - the size of the inserted messages
    • onPoll

      void onPoll(List<ExecutionMessage> messages, int queueSize)
      A callback that will be called when messages are polled from the queue
      Parameters:
      messages - the messages that are polled from the queue
      queueSize - the size of the polled messages
    • onTerminated

      void onTerminated(List<ExecutionMessage> messages)
      A callback that will be called when messages are in status of terminated
      Parameters:
      messages - the terminated messages
    • onFailed

      void onFailed(List<ExecutionMessage> messages)
      A callback that will be called when messages are in status of failed
      Parameters:
      messages - the failed messages
    • onPersistMessage

      void onPersistMessage(List<ExecutionMessage> messages)
      A callback that will be called when messages are required to be persisted in addition to the queue
      Parameters:
      messages - the to be persisted messages