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 operation
Q - type of ldap request
S - 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.
  • Field Details

    • logger

      protected final org.slf4j.Logger logger
      Logger for this class.
    • operation

      private T extends Operation<Q,S> operation
      operation to execute.
  • Constructor Details

    • AbstractOperationWorker

      public AbstractOperationWorker(T op)
      Creates a new abstract operation worker.
      Parameters:
      op - operation
  • Method Details

    • 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.
      Specified by:
      send in interface OperationWorker<T extends Operation<Q,S>,Q extends Request>
      Parameters:
      requests - containing the data required by this operation
      Returns:
      future responses for this operation
    • 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.
      Specified by:
      execute in interface OperationWorker<T extends Operation<Q,S>,Q extends Request>
      Parameters:
      requests - containing the data required by this operation
      Returns:
      responses for this operation
    • toString

      public String toString()
      Overrides:
      toString in class Object