Class DynamoDBStateActor<RS extends io.vlingo.symbio.State<?>>

  • 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
    • 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 a DynamoDBStateActor 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>
      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)  
      • 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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface io.vlingo.symbio.store.state.StateStoreReader

        read
      • Methods inherited from interface io.vlingo.symbio.store.state.StateStoreWriter

        write, write, write, write, write, write, write
    • 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 - the StateStore.Dispatcher that will handle dispatching state changes
        dispatcherControl - the StateStore.DispatcherControl this will handle resipatching and dispatch confirmation
        dynamodb - the AmazonDynamoDBAsync that provide async access to Amazon DynamoDB
        createTableInterest - the CreateTableInterest that is responsible for table creation
        recordAdapter - the RecordAdapter 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 a DynamoDBStateActor with the arguments.
        Parameters:
        dispatcher - the StateStore.Dispatcher that will handle dispatching state changes
        dynamodb - the AmazonDynamoDBAsync that provide async access to Amazon DynamoDB
        createTableInterest - the CreateTableInterest that is responsible for table creation
        recordAdapter - the RecordAdapter 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 interface io.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 interface io.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 interface io.vlingo.symbio.store.state.StateStore
      • tableFor

        protected final java.lang.String tableFor​(java.lang.Class<?> type)