InitializeSupportpublic class ConcurrentService extends InitializeObject
| Modifier and Type | Field | Description |
|---|---|---|
protected Map<Object,Object> |
barriers |
|
protected ExecutorService |
executorService |
mutex| Constructor | Description |
|---|---|
ConcurrentService() |
| Modifier and Type | Method | Description |
|---|---|---|
ConcurrentService |
addBarrier(Object barrierId) |
|
<V> V |
execute(Object barrierId,
Callable<V> task) |
|
<V> V |
execute(Object barrierId,
Callable<V> task,
long timeout,
TimeUnit unit) |
|
protected void |
init() |
|
ConcurrentService |
setExecutorService(ExecutorService executorService) |
assertNotInitialized, destroy, initializeprotected ExecutorService executorService
protected void init()
throws Exception
init in class InitializeObjectExceptionpublic <V> V execute(Object barrierId, Callable<V> task) throws Exception
Exceptionpublic <V> V execute(Object barrierId, Callable<V> task, long timeout, TimeUnit unit) throws Exception
Exceptionpublic ConcurrentService addBarrier(Object barrierId)
public ConcurrentService setExecutorService(ExecutorService executorService)
Copyright © 2018. All rights reserved.