Package org.javalite.async
Class QueueConfig
- java.lang.Object
-
- org.javalite.async.QueueConfig
-
public class QueueConfig extends Object
Simple configuration of queue.- Author:
- Igor Polevoy on 4/4/15.
-
-
Constructor Summary
Constructors Constructor Description QueueConfig(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandListenergetCommandListener()intgetListenerCount()StringgetName()booleanisDurable()
-
-
-
Constructor Detail
-
QueueConfig
public QueueConfig(String name, CommandListener commandListener, int listenerCount)
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
public QueueConfig(String name)
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 Detail
-
getName
public String getName()
-
getCommandListener
public CommandListener 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.
-
-