Package org.javalite.async
Class QueueConfig
java.lang.Object
org.javalite.async.QueueConfig
Simple configuration of queue.
- Author:
- Igor Polevoy on 4/4/15.
-
Constructor Summary
ConstructorDescriptionQueueConfig(String name)
Creates a specification of a queue for Async with no listeners attached.QueueConfig(String name, CommandListener commandListener, int listenerCount)
Creates a specification of a queue for Async.QueueConfig(String name, CommandListener commandListener, int listenerCount, boolean durable)
Creates a specification of a queue for Async -
Method Summary
-
Constructor Details
-
QueueConfig
Creates a specification of a queue for Async. By default the queue is durable (can save messages to hard drive).- Parameters:
name
- human readable name of queuecommandListener
- CommandListener instance, must be thread safe.listenerCount
- number of listeners to attach to a queue. Effectively this is a number of processing threads.
-
QueueConfig
Creates a specification of a queue for Async with no listeners attached. By default the queue is durable (can save messages to hard drive).- Parameters:
name
- human readable name of queue
-
QueueConfig
public QueueConfig(String name, CommandListener commandListener, int listenerCount, boolean durable)Creates a specification of a queue for Async- Parameters:
name
- human readable name of queuecommandListener
- CommandListener instance, must be thread safe.listenerCount
- number of listeners to attach to a queue. Effectively this is a number of processing threads.durable
- true to enable to save messages to hard drive, false otherwise.
-
-
Method Details
-
getName
-
getCommandListener
-
getListenerCount
public int getListenerCount() -
isDurable
public boolean isDurable()- Returns:
- True is the queue itself is durable (persistent from one broker instance to another) as well as capable to accept persistent messages.
-