public class WorkQueueImpl extends Object implements WorkQueue
WORKQUEUE_TYPE
Constructor and Description |
---|
WorkQueueImpl() |
Modifier and Type | Method and Description |
---|---|
void |
add(Work work)
添加一个工作
|
Work |
getIdleWork()
返回一个空闲工作
|
ObjectStorage |
getObjectStorage() |
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)
更新工作状态
|
public WorkQueueImpl() throws RemoteException
RemoteException
public ObjectStorage getObjectStorage()
public void setObjectStorage(ObjectStorage objectStorage)
WorkQueue
setObjectStorage
in interface WorkQueue
public void add(Work work) throws RemoteException
WorkQueue
add
in interface WorkQueue
RemoteException
public void updateWorkStatus(Work work, WorkStatus workStatus) throws RemoteException
WorkQueue
updateWorkStatus
in interface WorkQueue
RemoteException
public WorkStatus getWorkStatus(Work work) throws RemoteException
WorkQueue
getWorkStatus
in interface WorkQueue
RemoteException
public void remove(Work work) throws RemoteException
WorkQueue
remove
in interface WorkQueue
RemoteException
public int size() throws RemoteException
WorkQueue
size
in interface WorkQueue
RemoteException
public List<Work> getWorkList() throws RemoteException
WorkQueue
getWorkList
in interface WorkQueue
RemoteException
public Work getIdleWork() throws RemoteException
WorkQueue
getIdleWork
in interface WorkQueue
RemoteException
public List<Work> getWorkList(String type, WorkStatus workStatus)
WorkQueue
getWorkList
in interface WorkQueue
public List<Work> getWorkList(WorkStatus workStatus)
WorkQueue
getWorkList
in interface WorkQueue
public void replace(Work oldWork, Work newWork) throws RemoteException
WorkQueue
replace
in interface WorkQueue
RemoteException
public void moveToLast(Work work)
WorkQueue
moveToLast
in interface WorkQueue
Copyright © 2006–2018 TinyGroup. All rights reserved.