Class TaskGroup.InvocationContext

  • Enclosing class:
    TaskGroup

    public static final class TaskGroup.InvocationContext
    extends Object
    A mutable type that can be used to pass data around task items during the invocation of the TaskGroup.
    • Method Detail

      • taskGroup

        public TaskGroup taskGroup()
        Returns:
        the TaskGroup this invocation context associated with.
      • terminateOnErrorStrategy

        public TaskGroupTerminateOnErrorStrategy terminateOnErrorStrategy()
        Returns:
        the termination strategy to use upon error during the current invocation of the TaskGroup.
      • put

        public void put​(String key,
                        Object value)
        Put a key-value in the context.
        Parameters:
        key - the key
        value - the value
      • get

        public Object get​(String key)
        Get a value in the context with the given key.
        Parameters:
        key - the key
        Returns:
        value with the given key if exists, null otherwise.
      • hasKey

        public boolean hasKey​(String key)
        Check existence of a key in the context.
        Parameters:
        key - the key
        Returns:
        true if the key exists, false otherwise.