Package xal.tools.dispatch
Class DispatchGroup
java.lang.Object
xal.tools.dispatch.DispatchGroup
DispatchGroup
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voidaddOperation(xal.tools.dispatch.DispatchOperation<T> operation) add an operation to this groupstatic <T> voidaddOperationToCurrentGroups(xal.tools.dispatch.DispatchOperation<T> operation) add the operation to the current groupsstatic <T> voidaddOperationToGroups(xal.tools.dispatch.DispatchOperation<T> operation, Set<DispatchGroup> groups) add the operation to the specified groups<T> voidaddOperationToThisGroupAndCurrentGroups(xal.tools.dispatch.DispatchOperation<T> operation) add the operation to this group and the current groups without double counting this groupvoidawait()synonym for waitForCompletion()voidawait(long timeout) synonym for waitForCompletionWithTimeout( timeout )voidenter()Enter this group for addition of operations on the current threadprotected static Set<DispatchGroup>Get the set of current groupsvoidleave()Leave this group to remove it from addition of operations on the current thread<T> voidoperationCompleted(xal.tools.dispatch.DispatchOperation<T> operation) Event indicating that an operation in this group has completedvoidwait indefinitely for all operations to completevoidwaitForCompletionWithTimeout(long timeout) wait at most the timeout for all operations to complete
-
Constructor Details
-
DispatchGroup
public DispatchGroup()
-
-
Method Details
-
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
-