|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ldaptive.concurrent.AbstractOperationWorker<Q,S>
Q - type of ldap requestS - type of ldap responsepublic abstract class AbstractOperationWorker<Q extends Request,S>
Base class for worker operations. If no ExecutorService is provided a
cached thread pool is used by default.
| Field Summary | |
|---|---|
protected org.slf4j.Logger |
logger
Logger for this class. |
| Constructor Summary | |
|---|---|
AbstractOperationWorker(Operation<Q,S> op)
Creates a new abstract operation worker. |
|
AbstractOperationWorker(Operation<Q,S> op,
ExecutorService es)
Creates a new abstract operation worker. |
|
| Method Summary | ||
|---|---|---|
static
|
createCallable(Operation<Q,S> operation,
Q request)
Returns a Callable that executes the supplied request with the
supplied operation. |
|
Collection<Future<Response<S>>> |
execute(Q... requests)
Execute an ldap operation for each request on a separate thread. |
|
Future<Response<S>> |
execute(Q request)
Execute an ldap operation on a separate thread. |
|
Collection<Response<S>> |
executeToCompletion(Q... requests)
Execute an ldap operation for each request on a separate thread and waits for all operations to complete. |
|
protected void |
finalize()
|
|
void |
shutdown()
Invokes ExecutorService.shutdown() on the underlying executor
service. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final org.slf4j.Logger logger
| Constructor Detail |
|---|
public AbstractOperationWorker(Operation<Q,S> op)
op - operation
public AbstractOperationWorker(Operation<Q,S> op,
ExecutorService es)
op - operationes - executor service| Method Detail |
|---|
public Future<Response<S>> execute(Q request)
execute in interface OperationWorker<Q extends Request,S>request - containing the data required by this operation
public Collection<Future<Response<S>>> execute(Q... requests)
execute in interface OperationWorker<Q extends Request,S>requests - containing the data required by this operation
public Collection<Response<S>> executeToCompletion(Q... requests)
executeToCompletion in interface OperationWorker<Q extends Request,S>requests - containing the data required by this operation
public static <Q extends Request,S> Callable<Response<S>> createCallable(Operation<Q,S> operation,
Q request)
Callable that executes the supplied request with the
supplied operation.
Q - type of ldap requestS - type of ldap responseoperation - to executerequest - to pass to the operation
public void shutdown()
ExecutorService.shutdown() on the underlying executor
service.
protected void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||