| Modifier and Type | Interface and Description |
|---|---|
static class |
WorkflowToken.Scope
Keys in the
WorkflowToken can be added by user, using the put(java.lang.String, java.lang.String)
method. |
| Modifier and Type | Method and Description |
|---|---|
Value |
get(String key)
Get the most recent value added for the specified key for a
WorkflowToken.Scope.USER scope. |
Value |
get(String key,
String nodeName)
Get the value set for the specified key by the specified node for a
WorkflowToken.Scope.USER scope. |
Value |
get(String key,
String nodeName,
WorkflowToken.Scope scope)
Get the value set for the specified key by the specified node for a given scope.
|
Value |
get(String key,
WorkflowToken.Scope scope)
Get the most recent value for the specified key for a given scope.
|
Map<String,List<NodeValue>> |
getAll()
Same key can be added to the WorkflowToken by multiple nodes.
|
List<NodeValue> |
getAll(String key)
Same key can be added to the
WorkflowToken by multiple nodes. |
List<NodeValue> |
getAll(String key,
WorkflowToken.Scope scope)
Same key can be added to the WorkflowToken by multiple nodes.
|
Map<String,List<NodeValue>> |
getAll(WorkflowToken.Scope scope)
Same key can be added to the WorkflowToken by multiple nodes.
|
Map<String,Value> |
getAllFromNode(String nodeName)
Get the
Map of key to Values that were added to the WorkflowToken by
specific node for a WorkflowToken.Scope.USER scope. |
Map<String,Value> |
getAllFromNode(String nodeName,
WorkflowToken.Scope scope)
Get the
Map of key to Values that were added to the WorkflowToken by
specific node for a given scope. |
void |
put(String key,
String value)
Put the specified key and value into the
WorkflowToken. |
void |
put(String key,
Value value)
Put the specified key and
Value into the WorkflowToken. |
void put(String key, String value)
WorkflowToken. The token may store additional
information about the context in which this key is being set. For example, the context
information stored by the token may be the workflow node that is performing the operation, or
the name of the workflow if the operation is performed in AbstractWorkflow.initialize(io.cdap.cdap.api.workflow.WorkflowContext)
or AbstractWorkflow.destroy() method.key - the key representing the entryvalue - the value for the keyUnsupportedOperationException - if called in a context where the token may not be
modified.void put(String key, Value value)
Value into the WorkflowToken. The token may store
additional information about the context in which this key is being set. For example, the
context information stored by the token may be the workflow node that is performing the
operation, or the name of the workflow if the operation is performed in AbstractWorkflow.initialize(io.cdap.cdap.api.workflow.WorkflowContext) or AbstractWorkflow.destroy() method.key - the key representing entryvalue - the Value for the keyUnsupportedOperationException - if called in a context where the token may not be
modified.@Nullable Value get(String key)
WorkflowToken.Scope.USER scope.key - the key to be searchedValue for the key or null if the key does not exist in the
WorkflowToken.Scope.USER scope@Nullable Value get(String key, WorkflowToken.Scope scope)
key - the key to be searchedscope - the WorkflowToken.Scope for the keyValue for the key from the specified scope or null if the key
does not exist in the given scope@Nullable Value get(String key, String nodeName)
WorkflowToken.Scope.USER scope.
To get the token values set from AbstractWorkflow.initialize(io.cdap.cdap.api.workflow.WorkflowContext) or AbstractWorkflow.destroy() methods, provide the name of the Workflow as nodeName.key - the key to be searchednodeName - the name of the nodeValue set for the key by nodeName or null if the key is not
added by the nodeName in the WorkflowToken.Scope.USER scope@Nullable Value get(String key, String nodeName, WorkflowToken.Scope scope)
AbstractWorkflow.initialize(io.cdap.cdap.api.workflow.WorkflowContext) or AbstractWorkflow.destroy()
methods, provide the name of the Workflow as nodeName.key - the key to be searchednodeName - the name of the nodescope - the WorkflowToken.Scope for the keyValue set for the key by nodeName for a given scope or null if
the key is not added by the nodeName in the given scopeList<NodeValue> getAll(String key)
WorkflowToken by multiple nodes. This method returns the
List of NodeValue, where each entry represents the unique node name and the
Value that it set for the specified key for a WorkflowToken.Scope.USER scope.
The list maintains the order in which the values were inserted in the WorkflowToken for a specific key except in the case of fork and join. In case of fork in the Workflow, copies of the WorkflowToken are made and passed along each branch. At the join, all copies of the WorkflowToken are merged together. While merging, the order in which the values were inserted for a specific key is guaranteed within the same branch, but not across different branches.
key - the key to be searchedNodeValue from node name to the value that node added for the input
keyList<NodeValue> getAll(String key, WorkflowToken.Scope scope)
List of NodeValue, where each entry represents the unique node name and the Value that it set for the specified key for a given scope.
The list maintains the order in which the values were inserted in the WorkflowToken for a specific key except in the case of fork and join. In case of fork in the Workflow, copies of the WorkflowToken are made and passed along each branch. At the join, all copies of the WorkflowToken are merged together. While merging, the order in which the values were inserted for a specific key is guaranteed within the same branch, but not across different branches.
key - the key to be searchedscope - the WorkflowToken.Scope for the keyNodeValue from node name to the value that node added for the input
key for a given scopeMap<String,Value> getAllFromNode(String nodeName)
Map of key to Values that were added to the WorkflowToken by
specific node for a WorkflowToken.Scope.USER scope. To get the token values set from AbstractWorkflow.initialize(io.cdap.cdap.api.workflow.WorkflowContext) or AbstractWorkflow.destroy() methods, provide the name of
the Workflow as nodeName.nodeName - the unique name of the nodeMap<String,Value> getAllFromNode(String nodeName, WorkflowToken.Scope scope)
Map of key to Values that were added to the WorkflowToken by
specific node for a given scope. To get the token values set from AbstractWorkflow.initialize(io.cdap.cdap.api.workflow.WorkflowContext) or AbstractWorkflow.destroy() methods, provide the name of
the Workflow as nodeName.nodeName - the unique name of the nodescope - the WorkflowToken.Scope for the keyMap<String,List<NodeValue>> getAll()
List of NodeValue added in the WorkflowToken.Scope.USER scope.Map<String,List<NodeValue>> getAll(WorkflowToken.Scope scope)
List of NodeValue added in the WorkflowToken.Scope provided.Copyright © 2024 Cask Data, Inc. Licensed under the Apache License, Version 2.0.