TaskGroup.InvocationContext Class

  • java.lang.Object
    • com.azure.resourcemanager.resources.fluentcore.dag.TaskGroup.InvocationContext

public static final class TaskGroup.InvocationContext

A mutable type that can be used to pass data around task items during the invocation of the TaskGroup.

Field Summary

Modifier and Type Field and Description
static final String KEY_SKIP_TASKS

Key of the Set of tasks to skip.

Method Summary

Modifier and Type Method and Description
Object get(String key)

Get a value in the context with the given key.

boolean hasKey(String key)

Check existence of a key in the context.

void put(String key, Object value)

Put a key-value in the context.

TaskGroup taskGroup()

Gets the TaskGroup this invocation context associated with.

TaskGroupTerminateOnErrorStrategy terminateOnErrorStrategy()

Gets the termination strategy to use upon error during the current invocation of the TaskGroup.

InvocationContext withTerminateOnErrorStrategy(TaskGroupTerminateOnErrorStrategy strategy)

Sets the group termination strategy to use on error.

Methods inherited from java.lang.Object

Field Details

KEY_SKIP_TASKS

public static final String KEY_SKIP_TASKS

Key of the Set of tasks to skip.

Method Details

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.

put

public void put(String key, Object value)

Put a key-value in the context.

Parameters:

key - the key
value - the value

taskGroup

public TaskGroup taskGroup()

Gets the TaskGroup this invocation context associated with.

Returns:

the TaskGroup this invocation context associated with.

terminateOnErrorStrategy

public TaskGroupTerminateOnErrorStrategy terminateOnErrorStrategy()

Gets the termination strategy to use upon error during the current invocation of the TaskGroup.

Returns:

the termination strategy to use upon error during the current invocation of the TaskGroup.

withTerminateOnErrorStrategy

public TaskGroup.InvocationContext withTerminateOnErrorStrategy(TaskGroupTerminateOnErrorStrategy strategy)

Sets the group termination strategy to use on error.

Parameters:

strategy - the strategy

Returns:

the context

Applies to