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