Class PostgresStorageDelegate
- java.lang.Object
-
- io.vlingo.symbio.store.state.jdbc.JDBCStorageDelegate<java.lang.Object>
-
- io.vlingo.symbio.store.state.jdbc.postgres.PostgresStorageDelegate
-
- All Implemented Interfaces:
PostgresQueries
,io.vlingo.symbio.store.state.StateStore.StorageDelegate
public class PostgresStorageDelegate extends JDBCStorageDelegate<java.lang.Object> implements io.vlingo.symbio.store.state.StateStore.StorageDelegate, PostgresQueries
-
-
Field Summary
-
Fields inherited from class io.vlingo.symbio.store.state.jdbc.JDBCStorageDelegate
connection, dispatchableCachedStatements, format, logger, mode, originatorId, readStatements, writeStatements
-
Fields inherited from interface io.vlingo.symbio.store.state.jdbc.postgres.PostgresQueries
SQL_APPEND_ENTRY, SQL_APPEND_ENTRY_IDENTITY, SQL_CREATE_DISPATCHABLES_STORE, SQL_CREATE_ENTRY_STORE, SQL_CREATE_STATE_STORE, SQL_DISPATCH_ID_INDEX, SQL_DISPATCHABLE_APPEND, SQL_DISPATCHABLE_DELETE, SQL_DISPATCHABLE_SELECT, SQL_FORMAT_BINARY, SQL_FORMAT_BINARY_CAST, SQL_FORMAT_TEXT_CAST, SQL_FORMAT_TEXT1, SQL_ORIGINATOR_ID_INDEX, SQL_QUERY_ENTRY, SQL_QUERY_ENTRY_BATCH, SQL_STATE_READ, SQL_STATE_WRITE, TBL_VLINGO_SYMBIO_DISPATCHABLES, TBL_VLINGO_SYMBIO_STATE_ENTRY
-
-
Constructor Summary
Constructors Constructor Description PostgresStorageDelegate(Configuration configuration, io.vlingo.actors.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]
binaryDataFrom(java.sql.ResultSet resultSet, int columnIndex)
protected <D> D
binaryDataTypeObject()
io.vlingo.symbio.store.state.StateStore.StorageDelegate
copy()
protected JDBCDispatchableCachedStatements<java.lang.Object>
dispatchableCachedStatements()
protected java.lang.String
dispatchableIdIndexCreateExpression()
protected java.lang.String
dispatchableOriginatorIdIndexCreateExpression()
protected java.lang.String
dispatchableTableCreateExpression()
protected java.lang.String
dispatchableTableName()
io.vlingo.symbio.store.EntryReader.Advice
entryReaderAdvice()
protected java.lang.String
entryTableCreateExpression()
protected java.lang.String
entryTableName()
protected java.lang.String
readExpression(java.lang.String storeName, java.lang.String id)
protected <E> void
setBinaryObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.Entry<E> entry)
protected <S> void
setBinaryObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.State<S> state)
protected <E> void
setTextObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.Entry<E> entry)
protected <S> void
setTextObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.State<S> state)
protected java.lang.String
stateStoreTableCreateExpression(java.lang.String storeName)
protected java.lang.String
tableNameFor(java.lang.String storeName)
protected java.lang.String
textDataFrom(java.sql.ResultSet resultSet, int columnIndex)
protected java.lang.String
writeExpression(java.lang.String storeName)
-
Methods inherited from class io.vlingo.symbio.store.state.jdbc.JDBCStorageDelegate
allUnconfirmedDispatchableStates, appendExpressionFor, appendIdentityExpression, beginRead, beginWrite, close, complete, confirmDispatched, connection, dispatchableWriteExpressionFor, fail, isClosed, originatorId, readExpressionFor, session, stateFrom, writeExpressionFor
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.vlingo.symbio.store.state.StateStore.StorageDelegate
allUnconfirmedDispatchableStates, appendExpressionFor, appendIdentityExpression, beginRead, beginWrite, close, complete, confirmDispatched, connection, dispatchableWriteExpressionFor, fail, isClosed, originatorId, readExpressionFor, session, stateFrom, writeExpressionFor
-
-
-
-
Constructor Detail
-
PostgresStorageDelegate
public PostgresStorageDelegate(Configuration configuration, io.vlingo.actors.Logger logger)
-
-
Method Detail
-
copy
public io.vlingo.symbio.store.state.StateStore.StorageDelegate copy()
- Specified by:
copy
in interfaceio.vlingo.symbio.store.state.StateStore.StorageDelegate
-
entryReaderAdvice
public io.vlingo.symbio.store.EntryReader.Advice entryReaderAdvice()
- Specified by:
entryReaderAdvice
in interfaceio.vlingo.symbio.store.state.StateStore.StorageDelegate
-
binaryDataFrom
protected byte[] binaryDataFrom(java.sql.ResultSet resultSet, int columnIndex) throws java.lang.Exception
- Specified by:
binaryDataFrom
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
binaryDataTypeObject
protected <D> D binaryDataTypeObject() throws java.lang.Exception
- Specified by:
binaryDataTypeObject
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
dispatchableCachedStatements
protected JDBCDispatchableCachedStatements<java.lang.Object> dispatchableCachedStatements()
- Specified by:
dispatchableCachedStatements
in classJDBCStorageDelegate<java.lang.Object>
-
dispatchableIdIndexCreateExpression
protected java.lang.String dispatchableIdIndexCreateExpression()
- Specified by:
dispatchableIdIndexCreateExpression
in classJDBCStorageDelegate<java.lang.Object>
-
dispatchableOriginatorIdIndexCreateExpression
protected java.lang.String dispatchableOriginatorIdIndexCreateExpression()
- Specified by:
dispatchableOriginatorIdIndexCreateExpression
in classJDBCStorageDelegate<java.lang.Object>
-
dispatchableTableCreateExpression
protected java.lang.String dispatchableTableCreateExpression()
- Specified by:
dispatchableTableCreateExpression
in classJDBCStorageDelegate<java.lang.Object>
-
dispatchableTableName
protected java.lang.String dispatchableTableName()
- Specified by:
dispatchableTableName
in classJDBCStorageDelegate<java.lang.Object>
-
entryTableCreateExpression
protected java.lang.String entryTableCreateExpression()
- Specified by:
entryTableCreateExpression
in classJDBCStorageDelegate<java.lang.Object>
-
entryTableName
protected java.lang.String entryTableName()
- Specified by:
entryTableName
in classJDBCStorageDelegate<java.lang.Object>
-
readExpression
protected java.lang.String readExpression(java.lang.String storeName, java.lang.String id)
- Specified by:
readExpression
in classJDBCStorageDelegate<java.lang.Object>
-
setBinaryObject
protected <E> void setBinaryObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.Entry<E> entry) throws java.lang.Exception
- Specified by:
setBinaryObject
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
setBinaryObject
protected <S> void setBinaryObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.State<S> state) throws java.lang.Exception
- Specified by:
setBinaryObject
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
setTextObject
protected <E> void setTextObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.Entry<E> entry) throws java.lang.Exception
- Specified by:
setTextObject
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
setTextObject
protected <S> void setTextObject(CachedStatement<java.lang.Object> cached, int columnIndex, io.vlingo.symbio.State<S> state) throws java.lang.Exception
- Specified by:
setTextObject
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
stateStoreTableCreateExpression
protected java.lang.String stateStoreTableCreateExpression(java.lang.String storeName)
- Specified by:
stateStoreTableCreateExpression
in classJDBCStorageDelegate<java.lang.Object>
-
tableNameFor
protected java.lang.String tableNameFor(java.lang.String storeName)
- Specified by:
tableNameFor
in classJDBCStorageDelegate<java.lang.Object>
-
textDataFrom
protected java.lang.String textDataFrom(java.sql.ResultSet resultSet, int columnIndex) throws java.lang.Exception
- Specified by:
textDataFrom
in classJDBCStorageDelegate<java.lang.Object>
- Throws:
java.lang.Exception
-
writeExpression
protected java.lang.String writeExpression(java.lang.String storeName)
- Specified by:
writeExpression
in classJDBCStorageDelegate<java.lang.Object>
-
-