public final class ChainExtension extends Object implements DynamoDbEnhancedClientExtension
Modifier and Type | Method and Description |
---|---|
ReadModification |
afterRead(DynamoDbExtensionContext.AfterRead context)
Implementation of the
DynamoDbEnhancedClientExtension interface that will call all the chained extensions
in reverse order, passing the results of each one to the next and coalescing the results into a single modification. |
WriteModification |
beforeWrite(DynamoDbExtensionContext.BeforeWrite context)
Implementation of the
DynamoDbEnhancedClientExtension interface that will call all the chained extensions
in forward order, passing the results of each one to the next and coalescing the results into a single modification. |
static ChainExtension |
create(DynamoDbEnhancedClientExtension... extensions)
Construct a new instance of
ChainExtension . |
static ChainExtension |
create(List<DynamoDbEnhancedClientExtension> extensions)
Construct a new instance of
ChainExtension . |
public static ChainExtension create(DynamoDbEnhancedClientExtension... extensions)
ChainExtension
.extensions
- A list of DynamoDbEnhancedClientExtension
to chain together.ChainExtension
object.public static ChainExtension create(List<DynamoDbEnhancedClientExtension> extensions)
ChainExtension
.extensions
- A list of DynamoDbEnhancedClientExtension
to chain together.ChainExtension
object.public WriteModification beforeWrite(DynamoDbExtensionContext.BeforeWrite context)
DynamoDbEnhancedClientExtension
interface that will call all the chained extensions
in forward order, passing the results of each one to the next and coalescing the results into a single modification.
Multiple conditional statements will be separated by the string " AND ". Expression values will be coalesced
unless they conflict in which case an exception will be thrown.beforeWrite
in interface DynamoDbEnhancedClientExtension
context
- A DynamoDbExtensionContext.BeforeWrite
contextWriteModification
representing the coalesced results of all the chained extensions.public ReadModification afterRead(DynamoDbExtensionContext.AfterRead context)
DynamoDbEnhancedClientExtension
interface that will call all the chained extensions
in reverse order, passing the results of each one to the next and coalescing the results into a single modification.afterRead
in interface DynamoDbEnhancedClientExtension
context
- A DynamoDbExtensionContext.AfterRead
contextReadModification
representing the final transformation of all the chained extensions.Copyright © 2020. All rights reserved.