public class WorkQueue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
ALLOCATED |
static int |
OFFERED |
static int |
STARTED |
static int |
SUSPENDED |
static int |
UNDEFINED |
static int |
UNOFFERED |
static int |
WORKLISTED |
Constructor and Description |
---|
WorkQueue() |
WorkQueue(java.lang.String ownerID,
java.util.HashMap<java.lang.String,WorkItemRecord> items,
int qType,
boolean persisting) |
WorkQueue(java.lang.String ownerID,
int qType,
boolean persisting) |
WorkQueue(java.lang.String ownerID,
WorkItemRecord item,
int qType,
boolean persisting) |
WorkQueue(java.lang.String ownerID,
WorkQueue queue,
int qType,
boolean persisting) |
Modifier and Type | Method and Description |
---|---|
void |
add(WorkItemRecord item,
boolean log)
Adds a workitem to the queue
|
void |
addQueue(java.util.Map<java.lang.String,WorkItemRecord> queueMap)
Adds all members of the Map passed to the queue
|
void |
addQueue(WorkQueue queue)
Adds all the items in the queue passed to this work queue
(i.e.
|
void |
cleanse(WorkItemCache cache) |
void |
clear() |
void |
fromXML(Element element) |
void |
fromXML(java.lang.String xml) |
WorkItemRecord |
get(java.lang.String itemID)
Retrieves a workitem from the queue (but does not remove it)
|
java.util.Set<WorkItemRecord> |
getAll()
Retrieves a Set of all workitems in the queue
|
java.lang.String |
getID() |
java.lang.String |
getOwnerID() |
java.util.Map<java.lang.String,WorkItemRecord> |
getQueueAsMap()
Retrieves a HashMap of all workitems in the queue
|
java.lang.String |
getQueueName()
returns the name of this queue
|
static java.lang.String |
getQueueName(int qType)
returns the appropriate String identifier for the queue type passed
|
int |
getQueueSize()
returns the number of workitems in this queue
|
int |
getQueueType() |
boolean |
isEmpty() |
boolean |
isPersisting() |
static boolean |
isValidQueueType(int queueType) |
void |
refresh(WorkItemRecord wir) |
boolean |
remove(WorkItemRecord item)
Removes a workitem from the queue
|
void |
removeCase(java.lang.String caseID) |
void |
removeQueue(WorkQueue queue)
Removes all the items in the queue passed from this work queue
(i.e.
|
void |
setOwnerID(java.lang.String id) |
void |
setPersisting(boolean persist) |
void |
setQueue(WorkQueue queue)
Sets (replaces) this work queue's members with the members of the queue passed
|
void |
setQueueType(int qType) |
java.lang.String |
toXML() |
public static final int UNDEFINED
public static final int OFFERED
public static final int ALLOCATED
public static final int STARTED
public static final int SUSPENDED
public static final int UNOFFERED
public static final int WORKLISTED
public WorkQueue()
public WorkQueue(java.lang.String ownerID, int qType, boolean persisting)
public WorkQueue(java.lang.String ownerID, WorkItemRecord item, int qType, boolean persisting)
public WorkQueue(java.lang.String ownerID, java.util.HashMap<java.lang.String,WorkItemRecord> items, int qType, boolean persisting)
public WorkQueue(java.lang.String ownerID, WorkQueue queue, int qType, boolean persisting)
public void setOwnerID(java.lang.String id)
public java.lang.String getOwnerID()
public java.lang.String getID()
public int getQueueType()
public void setQueueType(int qType)
public boolean isPersisting()
public void setPersisting(boolean persist)
public void add(WorkItemRecord item, boolean log)
item
- the workitem to addpublic void addQueue(java.util.Map<java.lang.String,WorkItemRecord> queueMap)
queueMap
- the Map of [item id, YWorkItem] to addpublic void addQueue(WorkQueue queue)
queue
- the queue of items to addpublic void setQueue(WorkQueue queue)
queue
- the new queuepublic WorkItemRecord get(java.lang.String itemID)
itemID
- the ID of the workitem to retrievepublic java.util.Set<WorkItemRecord> getAll()
public java.util.Map<java.lang.String,WorkItemRecord> getQueueAsMap()
public boolean remove(WorkItemRecord item)
item
- the workitem to removepublic void removeQueue(WorkQueue queue)
queue
- the queue of items to removepublic void clear()
public void refresh(WorkItemRecord wir)
public void cleanse(WorkItemCache cache)
public void removeCase(java.lang.String caseID)
public boolean isEmpty()
public int getQueueSize()
public static java.lang.String getQueueName(int qType)
public static boolean isValidQueueType(int queueType)
public java.lang.String getQueueName()
public java.lang.String toXML()
public void fromXML(java.lang.String xml)
public void fromXML(Element element)
Copyright © 2004-2014 The YAWL Foundation.