Package wt.queue
Class StandardQueueService
java.lang.Object
wt.services.StandardManager
wt.queue.StandardQueueService
- All Implemented Interfaces:
Serializable,wt.fc._NetFactor,NetFactor,QueueService,wt.services.Manager
Standard implementation of the QueueService interface.
Use the newStandardQueueService static factory method(s),
not the StandardQueueService constructor, to construct instances
of this class. Instances must be constructed using the static factory(s),
in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
- See Also:
-
Field Summary
Fields inherited from interface wt.services.Manager
MANAGER_SERVICE, STARTUP_AUTOMATIC, STARTUP_MANUAL, STATUS_EMERGENCY_SHUTDOWN, STATUS_EMERGENCY_SHUTTING_DOWN, STATUS_SHUTDOWN, STATUS_SHUTDOWN_ERRORS, STATUS_SHUTDOWN_FAILURE, STATUS_SHUTTING_DOWN, STATUS_STARTED, STATUS_STARTED_ERRORS, STATUS_STARTING_UP, STATUS_STARTUP_FAILURE -
Method Summary
Modifier and TypeMethodDescriptionaddEntry(ProcessingQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args) Creates a new QueueEntry object corresponding to a processing request.addEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args, Timestamp sched_time) Creates a new QueueEntry object corresponding to a processing request.addEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args, Timestamp sched_time, StatusInfo statusInfo) Add a schedule entry specifying its status info
Supported API: truevoidaddMultiEntry(ProcessingQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Collection collection) Create and commit multiple Queue entires from a Collection.voidaddMultiEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Collection collection, Timestamp[] sched_time) Create and commit multiple Queue entires from a Collection.addUniqueEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args, Timestamp sched_time) Deprecated.booleancontains(ProcessingQueue queue, QueueEntry entry) Returns whether or not an entry belongs to the queue.booleancontains(ScheduleQueue queue, ScheduleQueueEntry entry) Returns whether or not an entry belongs to the queue.voiddeleteEntries(List<? extends Persistable> entries) Deletes a List of persistable queue entries QUEUE_ENTRY_DELETE is emmited.voiddeleteEntries(ProcessingQueue queue) Deletes all entries for the given queue
Supported API: truevoiddeleteEntries(ProcessingQueue queue, String status_code) Deletes all entries that have the status code specified.voiddeleteEntries(ScheduleQueue queue) Deletes all entries for the given queue QUEUE_ENTRY_DELETE event is emmited
Supported API: truevoiddeleteEntries(ScheduleQueue queue, String status_code) Deletes all entries that have the status code specified.voiddeleteEntry(WtQueue queue, WtQueueEntry queueEntry) Delete a queue entry
Supported API: truevoidexecEntries(ProcessingQueue queue) Execute all queue entries in the 'READY' state, in the increasing order of their 'entryNumbers'.voidexecEntries(ScheduleQueue queue) Execute all queue entries in the 'READY' state, in the increasing order of their 'entryNumbers'.execEntry(ProcessingQueue queue, WtQueueEntry entry) Executes a the queue entry passed as argument.execEntry(ScheduleQueue queue, WtQueueEntry entry) Executes a the queue entry passed as argument.Return a queue with the given name
Supported API: trueReturn a queue with the given name and type
Supported API: truebooleanhasItems(ProcessingQueue queue, String[] statuses) The method checks if there exist at least one queue entry with one of the specified statuses.queueEntries(ProcessingQueue queue) Returns all queue entries as an enumeration for the given queue
Supported API: truequeueEntries(ProcessingQueue queue, String status_code) Returns all queue entries that with the given state for the specified queue
Supported API: truequeueEntries(ProcessingQueue queue, Vector status_codes) Returns all queue entries that with the given state for the specified queue
Supported API: truequeueEntries(ScheduleQueue queue) Returns all queue entries as an enumeration for the given queue
Supported API: truequeueEntries(ScheduleQueue queue, String status_code) Returns all queue entries that with the given state for the specified queue
Supported API: truevoidresetQueueEntry(ProcessingQueue queue, String entry_num) Resets the specified queue entry to the ready state
Supported API: truevoidresetQueueEntry(ScheduleQueue queue, String entry_num) Resets the specified queue entry to the ready state
Supported API: trueupdateQueueEntry(WtQueue queue, wt.queue.UpdateEntry entryInfo) Update a queue entries status (only)
Supported API: trueupdateQueueEntry(WtQueue queue, WtQueueEntry newEntryState) Update a queue entry Supports updating the status and scheduled execution time (for schedule queues)
Supported API: trueMethods inherited from class wt.services.StandardManager
emergencyShutdown, emergencyShutdownComplete, emergencyShuttingDown, getClassInfo, getManagerService, getManagerStatus, getName, getStartupType, init, initialize, initialize, isStarted, newStandardManager, newStandardManager, performEmergencyShutdownProcess, registerEvents, setManagerService, shutdown, shutdownFailure, shutdownSuccess, shuttingDown, started, startedErrors, startingUp, startup, startupFailure, toString
-
Method Details
-
getQueue
Return a queue with the given name
Supported API: true- Specified by:
getQueuein interfaceQueueService- Parameters:
queue_name-- Returns:
- ProcessingQueue
- Throws:
WTException
-
getQueue
Return a queue with the given name and type
Supported API: true- Specified by:
getQueuein interfaceQueueService- Parameters:
queue_name-queue_type-- Returns:
- WtQueue
- Throws:
WTException
-
deleteEntries
Deletes all entries for the given queue
Supported API: true- Specified by:
deleteEntriesin interfaceQueueService- Parameters:
queue-- Throws:
WTException
-
deleteEntries
Deletes all entries for the given queue QUEUE_ENTRY_DELETE event is emmited
Supported API: true- Specified by:
deleteEntriesin interfaceQueueService- Parameters:
queue-- Throws:
WTException
-
deleteEntries
Deletes all entries that have the status code specified. for the given queue
Supported API: true- Specified by:
deleteEntriesin interfaceQueueService- Parameters:
queue-status_code-- Throws:
WTException
-
deleteEntries
Deletes all entries that have the status code specified. for the given queue QUEUE_ENTRY_DELETE event is emitted. ImmutableQueueException is thrown if attempt made to delete entry from Immutable queue.
Supported API: true- Specified by:
deleteEntriesin interfaceQueueService- Parameters:
queue-status_code-- Throws:
WTException
-
queueEntries
Returns all queue entries as an enumeration for the given queue
Supported API: true- Specified by:
queueEntriesin interfaceQueueService- Parameters:
queue-- Returns:
- Enumeration
- Throws:
WTException
-
queueEntries
Returns all queue entries as an enumeration for the given queue
Supported API: true- Specified by:
queueEntriesin interfaceQueueService- Parameters:
queue-- Returns:
- Enumeration
- Throws:
WTException
-
queueEntries
Returns all queue entries that with the given state for the specified queue
Supported API: true- Specified by:
queueEntriesin interfaceQueueService- Parameters:
queue-status_code-- Returns:
- Enumeration
- Throws:
WTException
-
queueEntries
Returns all queue entries that with the given state for the specified queue
Supported API: true- Specified by:
queueEntriesin interfaceQueueService- Parameters:
queue-status_codes-- Returns:
- Enumeration
- Throws:
WTException
-
queueEntries
Returns all queue entries that with the given state for the specified queue
Supported API: true- Specified by:
queueEntriesin interfaceQueueService- Parameters:
queue-status_code-- Returns:
- Enumeration
- Throws:
WTException
-
resetQueueEntry
Resets the specified queue entry to the ready state
Supported API: true- Specified by:
resetQueueEntryin interfaceQueueService- Parameters:
queue-entry_num-- Throws:
WTException
-
resetQueueEntry
Resets the specified queue entry to the ready state
Supported API: true- Specified by:
resetQueueEntryin interfaceQueueService- Parameters:
queue-entry_num-- Throws:
WTException
-
deleteEntry
Delete a queue entry
Supported API: true- Specified by:
deleteEntryin interfaceQueueService- Parameters:
queue-queueEntry-- Throws:
WTException
-
updateQueueEntry
public WtQueueEntry updateQueueEntry(WtQueue queue, wt.queue.UpdateEntry entryInfo) throws WTException Update a queue entries status (only)
Supported API: true- Specified by:
updateQueueEntryin interfaceQueueService- Parameters:
queue-entryInfo-- Returns:
- WtQueueEntry
- Throws:
WTException
-
updateQueueEntry
Update a queue entry Supports updating the status and scheduled execution time (for schedule queues)
Supported API: true- Specified by:
updateQueueEntryin interfaceQueueService- Parameters:
queue-entryInfo-- Returns:
- WtQueueEntry
- Throws:
WTException
-
addEntry
public QueueEntry addEntry(ProcessingQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args) throws WTException Creates a new QueueEntry object corresponding to a processing request.
Supported API: true- Specified by:
addEntryin interfaceQueueService- Parameters:
queue-princ-t_method-t_class-arg_types-args-- Returns:
- QueueEntry
- Throws:
WTException
-
execEntry
Executes a the queue entry passed as argument.
Supported API: true- Specified by:
execEntryin interfaceQueueService- Parameters:
entry-- Returns:
- WtQueueEntry
- Throws:
WTException
-
execEntry
Executes a the queue entry passed as argument.
Supported API: true- Specified by:
execEntryin interfaceQueueService- Parameters:
entry-- Returns:
- WtQueueEntry
- Throws:
WTException
-
addMultiEntry
public void addMultiEntry(ProcessingQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Collection collection) throws WTException Create and commit multiple Queue entires from a Collection. All entries are batch commited. The arg_types is used to define the type of arguments and number of entries to be created from the Collection. The collection itself will contain one or more sets of these arguments. This method will iterate through the collection creating multiple queue entires each containing the number and type of arguments specified in arg_types. If the number of values in the collection is not evenly divisiable by the number of types (in arg_types) a WTException will be thrown.
Supported API: true- Specified by:
addMultiEntryin interfaceQueueService- Parameters:
queue-princ-t_method-t_class-arg_types-collection-- Throws:
WTException
-
addUniqueEntry
@Deprecated public ScheduleQueueEntry addUniqueEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args, Timestamp sched_time) throws WTException Deprecated.Add a Queue entry with the given method invalid input: '&' class signature if one does not exist. Note this method doesn't tell us anything about whether more than one entry exists with the specified method invalid input: '&' class signature
Supported API: true- Specified by:
addUniqueEntryin interfaceQueueService- Parameters:
queue-princ-t_method-t_class-arg_types-args-sched_time-- Returns:
- Throws:
WTException
-
addEntry
public ScheduleQueueEntry addEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args, Timestamp sched_time) throws WTException Creates a new QueueEntry object corresponding to a processing request.
Supported API: true- Specified by:
addEntryin interfaceQueueService- Parameters:
queue-princ-t_method-t_class-arg_types-args-sched_time-- Returns:
- ScheduleQueueEntry
- Throws:
WTException
-
addEntry
public ScheduleQueueEntry addEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Object[] args, Timestamp sched_time, StatusInfo statusInfo) throws WTException Add a schedule entry specifying its status info
Supported API: true- Specified by:
addEntryin interfaceQueueService- Parameters:
princ-t_method-t_class-arg_types-args-sched_time-statusInfo-- Returns:
- Throws:
WTException
-
addMultiEntry
public void addMultiEntry(ScheduleQueue queue, WTPrincipal princ, String t_method, String t_class, Class[] arg_types, Collection collection, Timestamp[] sched_time) throws WTException Create and commit multiple Queue entires from a Collection. All entries are batch commited. The arg_types is used to define the type of arguments and number of entries to be created from the Collection. The collection itself will contain one or more sets of these arguments. This method will iterate through the collection creating multiple queue entires each containing the number and type of arguments specified in arg_types. If the number of values in the collection is not evenly divisiable by the number of types (in arg_types) a WTException will be thrown. An array of Timestamp(s) is provides such that each entry may be scheduled at a different time
Supported API: true- Specified by:
addMultiEntryin interfaceQueueService- Parameters:
queue-princ-t_method-t_class-arg_types-collection-sched_time-- Throws:
WTException
-
execEntries
Execute all queue entries in the 'READY' state, in the increasing order of their 'entryNumbers'.
Supported API: true- Specified by:
execEntriesin interfaceQueueService- Throws:
WTException
-
execEntries
Execute all queue entries in the 'READY' state, in the increasing order of their 'entryNumbers'.
Supported API: true- Specified by:
execEntriesin interfaceQueueService- Throws:
WTException
-
hasItems
The method checks if there exist at least one queue entry with one of the specified statuses.
Supported API: true- Specified by:
hasItemsin interfaceQueueService- Parameters:
statuses- List of statuses to consider. Constants from StatusInfo class.- Returns:
- boolean
- Throws:
WTException
-
contains
Returns whether or not an entry belongs to the queue.
Supported API: true- Parameters:
entry-- Returns:
- boolean
- Throws:
WTException
-
contains
Returns whether or not an entry belongs to the queue.
Supported API: true- Parameters:
entry-- Returns:
- boolean
- Throws:
WTException
-
deleteEntries
Deletes a List of persistable queue entries QUEUE_ENTRY_DELETE is emmited. ImmutableQueueException will occur if attempt made to delete entries from Immutable queue.
Supported API: true- Specified by:
deleteEntriesin interfaceQueueService- Parameters:
queue-- Throws:
WTException
-