Class SingleOperationManager<T extends Annotation>

java.lang.Object
org.glassfish.hk2.extras.operation.internal.SingleOperationManager<T>

public class SingleOperationManager<T extends Annotation> extends Object
  • Field Details

  • Constructor Details

    • SingleOperationManager

      SingleOperationManager(T scope, ServiceLocator locator)
  • Method Details

    • allocateNewIdentifier

      private OperationIdentifierImpl<T> allocateNewIdentifier()
    • createOperation

      public OperationHandleImpl<T> createOperation()
    • closeOperation

      void closeOperation(OperationHandleImpl<T> closeMe)
      Called with the operationLock held
      Parameters:
      closeMe - The non-null operation to close
    • disposeAllOperationServices

      void disposeAllOperationServices(OperationHandleImpl<T> closeMe)
      Explicitly called WITHOUT the operationLock held to avoid any deadlock with the context lock
      Parameters:
      closeMe - The non-null operation to close
    • associateWithThread

      void associateWithThread(long threadId, OperationHandleImpl<T> handle)
      OperationLock must be held
      Parameters:
      threadId - The threadId to associate with this handle
      handle - The handle to be associated with this thread
    • disassociateThread

      void disassociateThread(long threadId, OperationHandleImpl<T> toRemove)
      OperationLock must be held
      Parameters:
      threadId - The threadId to disassociate with this handle
    • getCurrentOperationOnThisThread

      OperationHandleImpl<T> getCurrentOperationOnThisThread(long threadId)
      OperationLock must be held
      Returns:
      The operation associated with the given thread
    • getCurrentOperationOnThisThread

      public OperationHandleImpl<T> getCurrentOperationOnThisThread()
      OperationLock need NOT be held
      Returns:
      The operation associated with the current thread
    • getAllOperations

      Set<OperationHandle<T>> getAllOperations()
    • shutdown

      void shutdown()
    • toString

      public String toString()
      Overrides:
      toString in class Object