Class ExecutionAttributes
java.lang.Object
software.amazon.awssdk.core.interceptor.ExecutionAttributes
- All Implemented Interfaces:
ToCopyableBuilder<ExecutionAttributes.Builder,
ExecutionAttributes>
@NotThreadSafe
public class ExecutionAttributes
extends Object
implements ToCopyableBuilder<ExecutionAttributes.Builder,ExecutionAttributes>
A mutable collection of
ExecutionAttribute
s that can be modified by ExecutionInterceptor
s in order to save and
retrieve information specific to the current execution.
This is useful for sharing data between ExecutionInterceptor
method calls specific to a particular execution.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
TODO: We should deprecate this builder - execution attributes are mutable - why do we need a builder? We can just use copy() if it's because ofunmodifiableExecutionAttributes(ExecutionAttributes)
. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionAttributes.Builder
builder()
copy()
boolean
<U> U
getAttribute
(ExecutionAttribute<U> attribute) Retrieve the current value of the provided attribute in this collection of attributes.Retrieve the collection of attributes.<U> Optional
<U> getOptionalAttribute
(ExecutionAttribute<U> attribute) Retrieve the Optional current value of the provided attribute in this collection of attributes.int
hashCode()
merge
(ExecutionAttributes lowerPrecedenceExecutionAttributes) Merge attributes of a higher precedence into the current lower precedence collection.void
putAbsentAttributes
(ExecutionAttributes lowerPrecedenceExecutionAttributes) Add the provided attributes to this attribute, if the provided attribute does not exist.putAttribute
(ExecutionAttribute<U> attribute, U value) Update or set the provided attribute in this collection of attributes.putAttributeIfAbsent
(ExecutionAttribute<U> attribute, U value) Set the provided attribute in this collection of attributes if it does not already exist in the collection.Take this object and create a builder that contains all of the current property values of this object.toString()
static ExecutionAttributes
unmodifiableExecutionAttributes
(ExecutionAttributes attributes) Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Constructor Details
-
ExecutionAttributes
public ExecutionAttributes()
-
-
Method Details
-
getAttribute
Retrieve the current value of the provided attribute in this collection of attributes. This will return null if the value is not set. -
getAttributes
Retrieve the collection of attributes. -
getOptionalAttribute
Retrieve the Optional current value of the provided attribute in this collection of attributes. This will return Optional Value. -
putAttribute
Update or set the provided attribute in this collection of attributes. -
putAttributeIfAbsent
Set the provided attribute in this collection of attributes if it does not already exist in the collection. -
merge
Merge attributes of a higher precedence into the current lower precedence collection. -
putAbsentAttributes
Add the provided attributes to this attribute, if the provided attribute does not exist. -
builder
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<ExecutionAttributes.Builder,
ExecutionAttributes> - Returns:
- a builder for type T
-
copy
-
equals
-
hashCode
public int hashCode() -
toString
-
unmodifiableExecutionAttributes
-