Class Configuration

  • Direct Known Subclasses:
    Configuration.TestConfiguration

    public class Configuration
    extends java.lang.Object
    A standard configuration for JDBC connections used by StateStore, Journal, and ObjectStore.
    • Field Detail

      • DefaultTransactionTimeout

        public static final long DefaultTransactionTimeout
        A default timeout for transactions if not specified by the client. Note that this is not used as a database timeout, but rather the timeout between reading some entity/entities from storage and writing and committing it/them back to storage. This means that user think-time is built in to the timeout value. The current default is 5 minutes but can be overridden by using the constructor that accepts the transactionTimeoutMillis value. For a practical use of this see the following implementations, where this timeout represents the time between creation of the UnitOfWork and its expiration:

        io.vlingo.symbio.store.object.jdbc.jdbi.JdbiObjectStoreDelegate io.vlingo.symbio.store.object.jdbc.jdbi.UnitOfWork

        See Also:
        Constant Field Values
      • actualDatabaseName

        public final java.lang.String actualDatabaseName
      • connection

        public final java.sql.Connection connection
      • databaseName

        public final java.lang.String databaseName
      • driverClassname

        public final java.lang.String driverClassname
      • format

        public final io.vlingo.symbio.store.DataFormat format
      • url

        public final java.lang.String url
      • username

        public final java.lang.String username
      • password

        public final java.lang.String password
      • useSSL

        public final boolean useSSL
      • originatorId

        public final java.lang.String originatorId
      • createTables

        public final boolean createTables
      • transactionTimeoutMillis

        public final long transactionTimeoutMillis
    • Constructor Detail

      • Configuration

        public Configuration​(Configuration.ConfigurationInterest interest,
                             java.lang.String driverClassname,
                             io.vlingo.symbio.store.DataFormat format,
                             java.lang.String url,
                             java.lang.String databaseName,
                             java.lang.String username,
                             java.lang.String password,
                             boolean useSSL,
                             java.lang.String originatorId,
                             boolean createTables)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • Configuration

        public Configuration​(Configuration.ConfigurationInterest interest,
                             java.lang.String driverClassname,
                             io.vlingo.symbio.store.DataFormat format,
                             java.lang.String url,
                             java.lang.String databaseName,
                             java.lang.String username,
                             java.lang.String password,
                             boolean useSSL,
                             java.lang.String originatorId,
                             boolean createTables,
                             long transactionTimeoutMillis)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • actualDatabaseName

        protected java.lang.String actualDatabaseName​(java.lang.String databaseName)
      • afterConnect

        protected void afterConnect()
                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • beforeConnect

        protected void beforeConnect()
                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • connect

        protected java.sql.Connection connect​(java.lang.String url,
                                              java.lang.String databaseName)