Class DynamoDBStateActor<RS extends io.vlingo.symbio.State<?>>
- java.lang.Object
-
- io.vlingo.actors.Actor
-
- io.vlingo.symbio.store.state.dynamodb.DynamoDBStateActor<RS>
-
- All Implemented Interfaces:
io.vlingo.actors.Startable
,io.vlingo.actors.Stoppable
,io.vlingo.actors.testkit.TestStateView
,io.vlingo.symbio.store.state.StateStore
,io.vlingo.symbio.store.state.StateStoreReader
,io.vlingo.symbio.store.state.StateStoreWriter
public class DynamoDBStateActor<RS extends io.vlingo.symbio.State<?>> extends io.vlingo.actors.Actor implements io.vlingo.symbio.store.state.StateStore
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.vlingo.symbio.store.state.StateStore
io.vlingo.symbio.store.state.StateStore.ConfirmDispatchedResultInterest, io.vlingo.symbio.store.state.StateStore.Dispatchable<R extends io.vlingo.symbio.State<?>>, io.vlingo.symbio.store.state.StateStore.Dispatcher, io.vlingo.symbio.store.state.StateStore.DispatcherControl, io.vlingo.symbio.store.state.StateStore.ReadResultInterest, io.vlingo.symbio.store.state.StateStore.StorageDelegate, io.vlingo.symbio.store.state.StateStore.WriteResultInterest
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DISPATCHABLE_TABLE_NAME
-
Constructor Summary
Constructors Constructor Description DynamoDBStateActor(io.vlingo.symbio.store.state.StateStore.Dispatcher dispatcher, com.amazonaws.services.dynamodbv2.AmazonDynamoDBAsync dynamodb, CreateTableInterest createTableInterest, RecordAdapter<RS> recordAdapter)
Constructs aDynamoDBStateActor
with the arguments.DynamoDBStateActor(io.vlingo.symbio.store.state.StateStore.Dispatcher dispatcher, io.vlingo.symbio.store.state.StateStore.DispatcherControl dispatcherControl, com.amazonaws.services.dynamodbv2.AmazonDynamoDBAsync dynamodb, CreateTableInterest createTableInterest, RecordAdapter<RS> recordAdapter)
NOTE: this constructor is intended only for supporting testing with mocks.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <ET extends io.vlingo.symbio.Entry<?>>
io.vlingo.common.Completes<io.vlingo.symbio.store.state.StateStoreEntryReader<ET>>entryReader(java.lang.String name)
void
read(java.lang.String id, java.lang.Class<?> type, io.vlingo.symbio.store.state.StateStore.ReadResultInterest interest, java.lang.Object object)
protected java.lang.String
tableFor(java.lang.Class<?> type)
<S,C>
voidwrite(java.lang.String id, S state, int stateVersion, java.util.List<io.vlingo.symbio.Source<C>> sources, io.vlingo.symbio.Metadata metadata, io.vlingo.symbio.store.state.StateStore.WriteResultInterest interest, java.lang.Object object)
-
Methods inherited from class io.vlingo.actors.Actor
address, afterRestart, afterStop, beforeRestart, beforeResume, beforeStart, childActorFor, childActorFor, completes, completesEventually, conclude, deadLetters, definition, disperseStowedMessages, equals, hashCode, isStopped, logger, parentAs, scheduler, secure, selfAs, stage, stageNamed, start, stop, stowMessages, toString, viewTestState, viewTestStateInitialization
-
-
-
-
Field Detail
-
DISPATCHABLE_TABLE_NAME
public static final java.lang.String DISPATCHABLE_TABLE_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DynamoDBStateActor
public DynamoDBStateActor(io.vlingo.symbio.store.state.StateStore.Dispatcher dispatcher, io.vlingo.symbio.store.state.StateStore.DispatcherControl dispatcherControl, com.amazonaws.services.dynamodbv2.AmazonDynamoDBAsync dynamodb, CreateTableInterest createTableInterest, RecordAdapter<RS> recordAdapter)
NOTE: this constructor is intended only for supporting testing with mocks.- Parameters:
dispatcher
- theStateStore.Dispatcher
that will handle dispatching state changesdispatcherControl
- theStateStore.DispatcherControl
this will handle resipatching and dispatch confirmationdynamodb
- theAmazonDynamoDBAsync
that provide async access to Amazon DynamoDBcreateTableInterest
- theCreateTableInterest
that is responsible for table creationrecordAdapter
- theRecordAdapter
that is responsible for un/marshalling state
-
DynamoDBStateActor
public DynamoDBStateActor(io.vlingo.symbio.store.state.StateStore.Dispatcher dispatcher, com.amazonaws.services.dynamodbv2.AmazonDynamoDBAsync dynamodb, CreateTableInterest createTableInterest, RecordAdapter<RS> recordAdapter)
Constructs aDynamoDBStateActor
with the arguments.- Parameters:
dispatcher
- theStateStore.Dispatcher
that will handle dispatching state changesdynamodb
- theAmazonDynamoDBAsync
that provide async access to Amazon DynamoDBcreateTableInterest
- theCreateTableInterest
that is responsible for table creationrecordAdapter
- theRecordAdapter
that is responsible for un/marshalling state
-
-
Method Detail
-
read
public void read(java.lang.String id, java.lang.Class<?> type, io.vlingo.symbio.store.state.StateStore.ReadResultInterest interest, java.lang.Object object)
- Specified by:
read
in interfaceio.vlingo.symbio.store.state.StateStoreReader
-
write
public <S,C> void write(java.lang.String id, S state, int stateVersion, java.util.List<io.vlingo.symbio.Source<C>> sources, io.vlingo.symbio.Metadata metadata, io.vlingo.symbio.store.state.StateStore.WriteResultInterest interest, java.lang.Object object)
- Specified by:
write
in interfaceio.vlingo.symbio.store.state.StateStoreWriter
-
entryReader
public <ET extends io.vlingo.symbio.Entry<?>> io.vlingo.common.Completes<io.vlingo.symbio.store.state.StateStoreEntryReader<ET>> entryReader(java.lang.String name)
- Specified by:
entryReader
in interfaceio.vlingo.symbio.store.state.StateStore
-
tableFor
protected final java.lang.String tableFor(java.lang.Class<?> type)
-
-