Package org.ldaptive.concurrent
Class AbstractOperationWorker<T extends Operation<Q,S>,Q extends Request,S extends Result>
- java.lang.Object
-
- org.ldaptive.concurrent.AbstractOperationWorker<T,Q,S>
-
- Type Parameters:
T
- type of operationQ
- type of ldap requestS
- type of ldap response
- All Implemented Interfaces:
OperationWorker<Q,S>
- Direct Known Subclasses:
AddOperationWorker
,CompareOperationWorker
,DeleteOperationWorker
,ModifyDnOperationWorker
,ModifyOperationWorker
,SearchOperationWorker
public abstract class AbstractOperationWorker<T extends Operation<Q,S>,Q extends Request,S extends Result> extends Object implements OperationWorker<Q,S>
Base class for worker operations.
-
-
Constructor Summary
Constructors Constructor Description AbstractOperationWorker(T op)
Creates a new abstract operation worker.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<S>
execute(Q[] requests)
Execute an ldap operation for each request on a separate thread and waits for all operations to complete.T
getOperation()
Returns the underlying operation.Collection<OperationHandle<Q,S>>
send(Q[] requests)
Execute an ldap operation for each request on a separate thread.void
setOperation(T op)
Sets the underlying operation.String
toString()
-
-
-
Constructor Detail
-
AbstractOperationWorker
public AbstractOperationWorker(T op)
Creates a new abstract operation worker.- Parameters:
op
- operation
-
-
Method Detail
-
getOperation
public T getOperation()
Returns the underlying operation.- Returns:
- operation
-
setOperation
public void setOperation(T op)
Sets the underlying operation.- Parameters:
op
- to set
-
send
public Collection<OperationHandle<Q,S>> send(Q[] requests)
Execute an ldap operation for each request on a separate thread.
-
execute
public Collection<S> execute(Q[] requests)
Execute an ldap operation for each request on a separate thread and waits for all operations to complete.
-
-