|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Queue
Queue
is used to manage a task queue.
Implementations of this interface must be threadsafe.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_QUEUE
The default queue name. |
static java.lang.String |
DEFAULT_QUEUE_PATH
The default queue path. |
Method Summary | |
---|---|
TaskHandle |
add()
Submits a task to this queue with an auto generated name with default options. |
TaskHandle |
add(TaskOptions taskOptions)
Submits a task to this queue. |
TaskHandle |
add(Transaction txn,
TaskOptions taskOptions)
Submits a task to this queue in the provided Transaction. |
java.lang.String |
getQueueName()
Returns the queue name. |
Field Detail |
---|
static final java.lang.String DEFAULT_QUEUE
static final java.lang.String DEFAULT_QUEUE_PATH
Method Detail |
---|
java.lang.String getQueueName()
TaskHandle add()
This method is similar to calling add(TaskOptions)
with
a TaskOptions
object returned by
TaskOptions.Builder.withDefaults()
.
TaskHandle
.
InternalFailureException
java.lang.IllegalStateException
- If the queue does not exist. (see queue.xml)
TaskAlreadyExistsException
TransientFailureException
- Attempting the request after this exception may succeed.
UnsupportedTranslationException
- If chosen character encoding is unsupported.TaskHandle add(TaskOptions taskOptions)
taskOptions
- The definition of the task.
TaskHandle
.
InternalFailureException
java.lang.IllegalStateException
- If the queue does not exist. (see queue.xml)
TaskAlreadyExistsException
TransientFailureException
- Attempting the request after this exception may succeed.
UnsupportedTranslationException
- If chosen character encoding is unsupported.TaskHandle add(Transaction txn, TaskOptions taskOptions)
txn
- an enclosing Transaction
or null, if not null a task cannot be named.taskOptions
- The definition of the task.
TaskHandle
.
InternalFailureException
java.lang.IllegalStateException
- If the queue does not exist. (see queue.xml)
TaskAlreadyExistsException
TransientFailureException
- Attempting the request after this exception may succeed.
UnsupportedTranslationException
- If chosen character encoding is unsupported.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |