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
ExecutionAttributes that can be modified by ExecutionInterceptors 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
Nested ClassesModifier and TypeClassDescriptionstatic final classTODO: 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ExecutionAttributes.Builderbuilder()copy()boolean<U> UgetAttribute(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.inthashCode()merge(ExecutionAttributes lowerPrecedenceExecutionAttributes) Merge attributes of a higher precedence into the current lower precedence collection.voidputAbsentAttributes(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 ExecutionAttributesunmodifiableExecutionAttributes(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:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<ExecutionAttributes.Builder,ExecutionAttributes> - Returns:
- a builder for type T
-
copy
-
equals
-
hashCode
-
toString
-
unmodifiableExecutionAttributes
-