Interface QueueListener
public interface QueueListener
User:
Date: 19/09/12
Time: 15:08
A listener interface for score queue events.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonEnqueue(List<ExecutionMessage> messages, int queueSize) A callback that will be called when messages are inserted to the queuevoidonFailed(List<ExecutionMessage> messages) A callback that will be called when messages are in status of failedvoidonPersistMessage(List<ExecutionMessage> messages) A callback that will be called when messages are required to be persisted in addition to the queuevoidonPoll(List<ExecutionMessage> messages, int queueSize) A callback that will be called when messages are polled from the queuevoidonTerminated(List<ExecutionMessage> messages) A callback that will be called when messages are in status of terminatedvoidprePersist(List<ExecutionMessage> messages) A callback that will be called when messages are inserted to the queue before they are persisted to the DB
-
Method Details
-
prePersist
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
A callback that will be called when messages are inserted to the queue- Parameters:
messages- the messages that are inserted to the queuequeueSize- the size of the inserted messages
-
onPoll
A callback that will be called when messages are polled from the queue- Parameters:
messages- the messages that are polled from the queuequeueSize- the size of the polled messages
-
onTerminated
A callback that will be called when messages are in status of terminated- Parameters:
messages- the terminated messages
-
onFailed
A callback that will be called when messages are in status of failed- Parameters:
messages- the failed messages
-
onPersistMessage
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
-