public class DispatchGroup
extends java.lang.Object
Constructor and Description |
---|
DispatchGroup()
Constructor
|
Modifier and Type | Method and Description |
---|---|
<ReturnType> |
addOperation(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
add an operation to this group
|
static <ReturnType> |
addOperationToCurrentGroups(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
add the operation to the current groups
|
static <ReturnType> |
addOperationToGroups(xal.tools.dispatch.DispatchOperation<ReturnType> operation,
java.util.Set<DispatchGroup> groups)
add the operation to the specified groups
|
<ReturnType> |
addOperationToThisGroupAndCurrentGroups(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
add the operation to this group and the current groups without double counting this group
|
void |
await()
synonym for waitForCompletion()
|
void |
await(long timeout)
synonym for waitForCompletionWithTimeout( timeout )
|
void |
enter()
Enter this group for addition of operations on the current thread
|
protected static java.util.Set<DispatchGroup> |
getCurrentGroups()
Get the set of current groups
|
void |
leave()
Leave this group to remove it from addition of operations on the current thread
|
<ReturnType> |
operationCompleted(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
Event indicating that an operation in this group has completed
|
void |
waitForCompletion()
wait indefinitely for all operations to complete
|
void |
waitForCompletionWithTimeout(long timeout)
wait at most the timeout for all operations to complete
|
protected static java.util.Set<DispatchGroup> getCurrentGroups()
public void enter()
public void leave()
public void await()
public void waitForCompletion()
public void await(long timeout)
public void waitForCompletionWithTimeout(long timeout)
timeout
- the maximum timeout in milliseconds to waitpublic <ReturnType> void addOperationToThisGroupAndCurrentGroups(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
public static <ReturnType> void addOperationToCurrentGroups(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
public static <ReturnType> void addOperationToGroups(xal.tools.dispatch.DispatchOperation<ReturnType> operation, java.util.Set<DispatchGroup> groups)
public <ReturnType> void addOperation(xal.tools.dispatch.DispatchOperation<ReturnType> operation)
public <ReturnType> void operationCompleted(xal.tools.dispatch.DispatchOperation<ReturnType> operation)