public interface Worker extends ParallelObject
| Modifier and Type | Field and Description |
|---|---|
static String |
WORKER_TYPE |
| Modifier and Type | Method and Description |
|---|---|
boolean |
acceptWork(Work work)
是否接受工作 即使是同样类型的工人,有可能对工作也挑三捡四,这里给了工人一定的灵活性
|
String |
getType()
返回类型
|
Warehouse |
work(Work work)
执行工作
|
getIdstatic final String WORKER_TYPE
Warehouse work(Work work) throws RemoteException
RemoteExceptionboolean acceptWork(Work work) throws RemoteException
work - RemoteExceptionString getType() throws RemoteException
getType in interface ParallelObjectRemoteExceptionCopyright © 2006–2018 TinyGroup. All rights reserved.