public interface WorkQueue extends RemoteObject
| Modifier and Type | Field and Description |
|---|---|
static String |
WORKQUEUE_TYPE |
| Modifier and Type | Method and Description |
|---|---|
void |
add(Work work)
添加一个工作
|
Work |
getIdleWork()
返回一个空闲工作
|
List<Work> |
getWorkList()
返回所有的工作列表
|
List<Work> |
getWorkList(String type,
WorkStatus workStatus)
返回指定类型指定工作状态的工作列表
|
List<Work> |
getWorkList(WorkStatus workStatus)
返回指定工作状态的工作列表
|
WorkStatus |
getWorkStatus(Work work)
获取工作状态
|
void |
moveToLast(Work work)
把工作移动到工作队列最后
|
void |
remove(Work work)
删除一个工作
|
void |
replace(Work oldWork,
Work newWork)
去掉一个旧工作,添加一个新工作
|
void |
setObjectStorage(ObjectStorage objectStorage)
设置对象仓库
|
int |
size()
返回工作总数
|
void |
updateWorkStatus(Work work,
WorkStatus workStatus)
更新工作状态
|
static final String WORKQUEUE_TYPE
void setObjectStorage(ObjectStorage objectStorage) throws RemoteException
objectStorage - RemoteExceptionvoid add(Work work) throws RemoteException
work - RemoteExceptionvoid remove(Work work) throws RemoteException
work - RemoteExceptionvoid updateWorkStatus(Work work, WorkStatus workStatus) throws RemoteException
work - RemoteExceptionWorkStatus getWorkStatus(Work work) throws RemoteException
work - RemoteExceptionint size() throws RemoteException
RemoteExceptionList<Work> getWorkList() throws RemoteException
RemoteExceptionWork getIdleWork() throws RemoteException
RemoteExceptionList<Work> getWorkList(String type, WorkStatus workStatus) throws RemoteException
type - workStatus - RemoteExceptionList<Work> getWorkList(WorkStatus workStatus) throws RemoteException
workStatus - RemoteExceptionvoid replace(Work oldWork, Work newWork) throws RemoteException
oldWork - newWork - RemoteExceptionvoid moveToLast(Work work) throws RemoteException
work - RemoteExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.