Class DispatchGroup

java.lang.Object
xal.tools.dispatch.DispatchGroup

public class DispatchGroup extends Object
DispatchGroup
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> void
    addOperation(xal.tools.dispatch.DispatchOperation<T> operation)
    add an operation to this group
    static <T> void
    addOperationToCurrentGroups(xal.tools.dispatch.DispatchOperation<T> operation)
    add the operation to the current groups
    static <T> void
    addOperationToGroups(xal.tools.dispatch.DispatchOperation<T> operation, Set<DispatchGroup> groups)
    add the operation to the specified groups
    <T> void
    addOperationToThisGroupAndCurrentGroups(xal.tools.dispatch.DispatchOperation<T> operation)
    add the operation to this group and the current groups without double counting this group
    void
    synonym for waitForCompletion()
    void
    await(long timeout)
    synonym for waitForCompletionWithTimeout( timeout )
    void
    Enter this group for addition of operations on the current thread
    protected static Set<DispatchGroup>
    Get the set of current groups
    void
    Leave this group to remove it from addition of operations on the current thread
    <T> void
    operationCompleted(xal.tools.dispatch.DispatchOperation<T> operation)
    Event indicating that an operation in this group has completed
    void
    wait indefinitely for all operations to complete
    void
    wait at most the timeout for all operations to complete

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DispatchGroup

      public DispatchGroup()
  • Method Details

    • getCurrentGroups

      protected static Set<DispatchGroup> getCurrentGroups()
      Get the set of current groups
    • enter

      public void enter()
      Enter this group for addition of operations on the current thread
    • leave

      public void leave()
      Leave this group to remove it from addition of operations on the current thread
    • await

      public void await()
      synonym for waitForCompletion()
    • waitForCompletion

      public void waitForCompletion()
      wait indefinitely for all operations to complete
    • await

      public void await(long timeout)
      synonym for waitForCompletionWithTimeout( timeout )
    • waitForCompletionWithTimeout

      public void waitForCompletionWithTimeout(long timeout)
      wait at most the timeout for all operations to complete
      Parameters:
      timeout - the maximum timeout in milliseconds to wait
    • addOperationToThisGroupAndCurrentGroups

      public <T> void addOperationToThisGroupAndCurrentGroups(xal.tools.dispatch.DispatchOperation<T> operation)
      add the operation to this group and the current groups without double counting this group
    • addOperationToCurrentGroups

      public static <T> void addOperationToCurrentGroups(xal.tools.dispatch.DispatchOperation<T> operation)
      add the operation to the current groups
    • addOperationToGroups

      public static <T> void addOperationToGroups(xal.tools.dispatch.DispatchOperation<T> operation, Set<DispatchGroup> groups)
      add the operation to the specified groups
    • addOperation

      public <T> void addOperation(xal.tools.dispatch.DispatchOperation<T> operation)
      add an operation to this group
    • operationCompleted

      public <T> void operationCompleted(xal.tools.dispatch.DispatchOperation<T> operation)
      Event indicating that an operation in this group has completed