Class MockQueue
java.lang.Object
com.erudika.para.core.queue.MockQueue
- All Implemented Interfaces:
Queue
- Author:
- Alex Bogdanovski [[email protected]]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetName()Returns the name of the queue.pull()Pulls one or more messages from a queue.voidPushes a message to a queue.voidSets the name of the queue.voidStart a new async task which polls the queue and automatically processes the messages.voidStops the polling async task manually.
-
Constructor Details
-
MockQueue
public MockQueue()Default constructor. -
MockQueue
- Parameters:
name- name
-
-
Method Details
-
pull
-
push
-
getName
-
setName
-
startPolling
public void startPolling()Description copied from interface:QueueStart a new async task which polls the queue and automatically processes the messages. This was inspired by Elasticsearch rivers.- Specified by:
startPollingin interfaceQueue
-
stopPolling
public void stopPolling()Description copied from interface:QueueStops the polling async task manually. This method should always be called on shutdown.- Specified by:
stopPollingin interfaceQueue
-