|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
The task queue is a base service for clustered systems.
It provides interfaces to write and to read tasks in a
platform-spreading queue and to monitor the tasks and (above all) their
processing state.
Access to the task queue is provided by a ITaskQueueReader and a
ITaskQueueWriter interface. This thin interfaces support the
implementation of highly spezialised and customizable distributed services.
(For example a service could implement a customized service writer as a
wrapper of the task queue writer and a customized service daemon reader as a
wrapper of the reader).
Reader and writer are assigned to a special namespace and a service user. A writer can only write tasks belonging to its namespace. A reader can only read task of its namespace. A namespace is a unique application identifier.
A task queue consists of a list (a sequence) of tasks. The tasks can be added
to and removed from the list on a priority basis (lowest priority values first, first-in-first-out (FIFO) basis within
priority).
This services provides support of different persistence layers. It is recommended to use the database persistence layer in production systems. File system and memory persistence layers are only recommended for testing to offer a high-performance test plattform with some restrictions.
The monitor methods will return only a snapshot of the current task queue. For maintenance a remove method is provided to remove completly progressed or incorrectly aborted tasks from the queue.
| Field Summary | |
static java.lang.String |
TASKQUEUE_SERVICE
identifier for TaskQueue Service |
| Method Summary | |
ITaskQueueReader |
getTaskQueueReader(java.lang.String user,
java.lang.String namespace)
Returns a task queue reader for read acccess to the queue service. |
ITaskQueueWriter |
getTaskQueueWriter(java.lang.String user,
java.lang.String namespace)
Returns a task queue writer for write acccess to the queue service. |
ITask |
monitorTask(java.lang.String id)
Returns a task with id id |
ITaskQueueIterator |
monitorTaskQueue(java.lang.String namespace)
Returns an iterator for tasks belonging to service . |
ITaskQueueIterator |
monitorTaskQueue(TaskState state)
Returns an iterator for tasks that have task state state .
|
ITaskQueueIterator |
monitorTaskQueues()
Returns an iterator for all queued tasks. |
boolean |
removeTask(ITask task)
Removes a task that is queued by this service. |
| Methods inherited from interface com.sapportals.wcm.service.IService |
getDescription, getDescription, getID |
| Field Detail |
public static final java.lang.String TASKQUEUE_SERVICE
| Method Detail |
public ITaskQueueWriter getTaskQueueWriter(java.lang.String user,
java.lang.String namespace)
throws WcmException
user - The user of this interfacenamespace - The namespace this writer is assigned to.WcmException - Exception raised in failure situation
public ITaskQueueReader getTaskQueueReader(java.lang.String user,
java.lang.String namespace)
throws WcmException
user - The user of this interfacenamespace - The namespace this reader is assigned to.WcmException - Exception raised in failure situation
public ITaskQueueIterator monitorTaskQueue(java.lang.String namespace)
throws WcmException
service . This is a
snapshot of the current task queue. It does not change during time.namespace - The namespace to monitorWcmException - Exception raised in failure situation
public ITaskQueueIterator monitorTaskQueue(TaskState state)
throws WcmException
state .
This is a snapshot of the current task queue. It does not change during
time.state - The state to monitorWcmException - Exception raised in failure situation
public ITask monitorTask(java.lang.String id)
throws WcmException
id
public ITaskQueueIterator monitorTaskQueues()
throws WcmException
WcmException - Exception raised in failure situation
public boolean removeTask(ITask task)
throws WcmException
TaskState.DONE or TaskState.ERROR).task - The task to removeWcmException - Raised on illegal task states, persistence
failures,...
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||