Package | Description |
---|---|
org.tinygroup.tinypc | |
org.tinygroup.tinypc.impl |
Modifier and Type | Method and Description |
---|---|
Work |
WorkQueue.getIdleWork()
返回一个空闲工作
|
Work |
Work.getNextWork()
返回后续步骤的工作,如果有,说明是复合工作,如果没有,说明是简单工作
|
Work |
Work.setNextWork(Work nextWork)
设置后续步骤工作
|
Modifier and Type | Method and Description |
---|---|
List<Work> |
JobCenter.getWorkList()
返回所有的工作列表
|
List<Work> |
WorkQueue.getWorkList()
返回所有的工作列表
|
List<Work> |
JobCenter.getWorkList(String type,
WorkStatus workStatus)
返回某种类型的某种状态的工作列表
|
List<Work> |
WorkQueue.getWorkList(String type,
WorkStatus workStatus)
返回指定类型指定工作状态的工作列表
|
List<Work> |
WorkQueue.getWorkList(WorkStatus workStatus)
返回指定工作状态的工作列表
|
Modifier and Type | Method and Description |
---|---|
boolean |
Worker.acceptWork(Work work)
是否接受工作 即使是同样类型的工人,有可能对工作也挑三捡四,这里给了工人一定的灵活性
|
void |
WorkQueue.add(Work work)
添加一个工作
|
Warehouse |
JobCenter.doWork(Work work)
执行一项工作,期望同步得到结果或异常 如果没有合适的工人或包工头进行处理,马上会抛出异常
|
List<Worker> |
JobCenter.getWorkerList(Work work)
返回具有某种类型的空闲且愿意接受工作的工人列表
|
WorkStatus |
JobCenter.getWorkStatus(Work work)
返回指定工作的工作状态
|
WorkStatus |
WorkQueue.getWorkStatus(Work work)
获取工作状态
|
void |
WorkQueue.moveToLast(Work work)
把工作移动到工作队列最后
|
void |
JobCenter.registerWork(Work work)
注册一份工作,工作情况不需要马上关注。因此也就不用等待,马上返回可以进行其它处理
如果有返回结果,可以通过异步方式,,异步方式可以用后续工作的方式来指定
|
void |
WorkQueue.remove(Work work)
删除一个工作
|
void |
WorkQueue.replace(Work oldWork,
Work newWork)
去掉一个旧工作,添加一个新工作
|
Work |
Work.setNextWork(Work nextWork)
设置后续步骤工作
|
List<Warehouse> |
WorkSplitter.split(Work work,
List<Worker> workers)
把一个任务分解为多个任务
|
void |
JobCenter.unregisterWork(Work work)
取消工作,在工作没有分配出去之前,可以从职介所注消工作,如果工作已经分配出去,则无法注消
|
void |
WorkQueue.updateWorkStatus(Work work,
WorkStatus workStatus)
更新工作状态
|
Warehouse |
Worker.work(Work work)
执行工作
|
Warehouse |
Foreman.work(Work work,
List<Worker> workerList)
开始干活以完成工作
|
Modifier and Type | Class and Description |
---|---|
class |
WorkDefault
Created by luoguo on 14-1-8.
|
Modifier and Type | Method and Description |
---|---|
Work |
WorkQueueImpl.getIdleWork() |
Work |
WorkDefault.getNextWork() |
Work |
WorkDefault.setNextWork(Work nextStepWork) |
Modifier and Type | Method and Description |
---|---|
List<Work> |
AbstractJobCenter.getWorkList() |
List<Work> |
WorkQueueImpl.getWorkList() |
List<Work> |
AbstractJobCenter.getWorkList(String type,
WorkStatus workStatus) |
List<Work> |
WorkQueueImpl.getWorkList(String type,
WorkStatus workStatus) |
List<Work> |
WorkQueueImpl.getWorkList(WorkStatus workStatus) |
Modifier and Type | Method and Description |
---|---|
boolean |
AbstractWorker.acceptWork(Work work)
默认全部接受
|
void |
WorkQueueImpl.add(Work work) |
protected abstract Warehouse |
AbstractWorker.doWork(Work work)
真正的工作处理,在这里,如果提供取消工作需要对isCancel()的值进行判断,
如果是true的时候,表示要停止处理,这个时候要立即返回
|
Warehouse |
AbstractJobCenter.doWork(Work work) |
List<Worker> |
AbstractJobCenter.getWorkerList(Work work) |
WorkStatus |
AbstractJobCenter.getWorkStatus(Work work) |
WorkStatus |
WorkQueueImpl.getWorkStatus(Work work) |
void |
WorkQueueImpl.moveToLast(Work work) |
void |
AbstractJobCenter.registerWork(Work work) |
void |
WorkQueueImpl.remove(Work work) |
void |
WorkQueueImpl.replace(Work oldWork,
Work newWork) |
void |
AbstractJobCenter.replaceWork(Work oldWork,
Work newWork) |
Work |
WorkDefault.setNextWork(Work nextStepWork) |
void |
AbstractJobCenter.unregisterWork(Work work) |
void |
WorkQueueImpl.updateWorkStatus(Work work,
WorkStatus workStatus) |
Warehouse |
AbstractWorker.work(Work work) |
Warehouse |
ForemanSelectOneWorker.work(Work work,
List<Worker> workerList) |
Warehouse |
ForemanSelectAllWorker.work(Work work,
List<Worker> workerList) |
Constructor and Description |
---|
WorkExecutor(Work work,
Worker worker,
List<Warehouse> warehouseList,
List<Worker> workers) |
Copyright © 2006–2018 TinyGroup. All rights reserved.