Packages

package resource

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait DbLock extends NamedLogging with FlagCloseable with HasCloseContext

    Abstraction for an application-specific database lock.

    Abstraction for an application-specific database lock.

    The lock is identified by an integer and bound to the given database's session/connection.

    If the connection is lost, the database releases the lock and the DbLock sets the lock state to Lost. The caller's connection management has to recreate and try to reacquire the lock with the given id. NOTE: The database must be configured with a single connection.

  2. sealed trait DbLockConfigError extends Product with Serializable with PrettyPrinting
  3. sealed abstract case class DbLockCounter extends PrettyPrinting with Product with Serializable
  4. sealed trait DbLockError extends Product with Serializable with PrettyPrinting
  5. final case class DbLockId extends PrettyPrinting with Product with Serializable

    Common Wrapper for DB lock identifier

  6. sealed trait DbLockMode extends Product with Serializable with PrettyPrinting
  7. class DbLockPostgres extends DbLock

    A Postgres DB lock using advisory locks

  8. class DbLockedConnection extends NamedLogging with FlagCloseable with HasCloseContext with StateMachine[State]

    Maintains the combination of a persistent DB connection and a DB lock acquired on that connection.

    Maintains the combination of a persistent DB connection and a DB lock acquired on that connection.

    If the connection is closed or becomes invalid, it will try to rebuild the connection and re-acquire the lock.

  9. sealed trait DbLockedConnectionError extends Product with Serializable with PrettyPrinting
  10. class DbLockedConnectionPool extends JdbcDataSource with FlagCloseable with HasCloseContext with NamedLogging with StateMachine[State]

    A pool of DbLockedConnection for writes guarded by a main lock.

    A pool of DbLockedConnection for writes guarded by a main lock. It implements the slick.jdbc.JdbcDataSource trait to be used by slick.

    The pool is considered active iff the main connection is active, i.e., the connection is healthy and the lock acquired. If the main connection becomes inactive, the pool of connections are ramped down and the pool periodically attempts to become active again. Once a pool becomes active, it waits for the other pool to ramp down by acquiring exclusive access to the pool's shared lock.

  11. sealed trait DbLockedConnectionPoolError extends Product with Serializable
  12. class DbMigrations extends NamedLogging

    Performs DB migrations using Flyway.

  13. trait DbStorage extends Storage
  14. final class DbStorageMulti extends DbStorage with NamedLogging with HasCloseContext

    DB Storage implementation that allows multiple processes to access the underlying database and uses a pool of write connections which are guarded by an exclusive main lock to ensure a single writer instance.

    DB Storage implementation that allows multiple processes to access the underlying database and uses a pool of write connections which are guarded by an exclusive main lock to ensure a single writer instance.

    Periodically checks the activeness of the write connection pool and if the activeness changes executes the onActive or onPassive callbacks.

  15. final class DbStorageSingle extends DbStorage with FlagCloseable with NamedLogging

    DB Storage implementation that assumes a single process accessing the underlying database.

  16. trait DbStore extends FlagCloseable with NamedLogging with HasCloseContext
  17. class KeepAliveConnection extends Connection

    Connection wrapper to prevent closing of the connection.

  18. final class MemoryStorage extends Storage with NamedLogging with FlagCloseable
  19. trait StateMachine[S] extends AnyRef
  20. sealed trait Storage extends CloseableHealthComponent with AtomicHealthComponent

    Storage resources (e.g., a database connection pool) that must be released on shutdown.

    Storage resources (e.g., a database connection pool) that must be released on shutdown.

    The only common functionality defined is the shutdown through AutoCloseable. Using storage objects after shutdown is unsafe; thus, they should only be closed when they're ready for garbage collection.

  21. trait StorageFactory extends AnyRef
  22. class StorageMultiFactory extends StorageFactory with NamedLogging
  23. class StorageSingleFactory extends StorageFactory

    Storage factory for nodes with a single writer to the database.

    Storage factory for nodes with a single writer to the database. MUST NOT be used for replicated nodes, use StorageMultiFactory instead.

  24. sealed trait TransactionalStoreUpdate extends AnyRef

    A store update operation that can be executed transactionally with other independent update operations.

    A store update operation that can be executed transactionally with other independent update operations. Transactionality means that either all updates execute or none. The updates in a transactional execution must be independent of each other. During such an execution, partial updates may be observable by concurrent store accesses.

    Useful for updating stores on multiple synchronizers transactionally.

Value Members

  1. object DatabaseStorageError extends StorageErrorGroup
  2. object DbExceptionRetryPolicy extends ExceptionRetryPolicy

    Defines which exceptions should be retryable when thrown by the database.

  3. object DbLock
  4. object DbLockCounter extends Serializable
  5. object DbLockCounters

    We pre-allocate a set of counters that are used as part of the lock ID allocation.

  6. object DbLockError extends Serializable
  7. object DbLockId extends Serializable
  8. object DbLockMode extends Serializable
  9. object DbLockedConnection
  10. object DbLockedConnectionError extends Serializable
  11. object DbLockedConnectionPool
  12. object DbLockedConnectionPoolError extends Serializable
  13. object DbMigrations
  14. object DbParameterUtils

    This trait provides utility methods for database operations, specifically for retrieving integer array data from parameters in the database.

  15. object DbStorage
  16. object DbStorageMulti
  17. object DbStorageSingle
  18. object DbStringEncodingCheck extends HasLoggerName
  19. object DbVersionCheck extends HasLoggerName
  20. object IdempotentInsert

    Utilities for safely and idempotently inserting records to a datastore.

  21. object KeepAliveConnection
  22. object PostgresDbLock
  23. object Storage
  24. object StorageDebug

    Convenience method to extract the arguments of a sql query for debugging purposes

    Convenience method to extract the arguments of a sql query for debugging purposes

    Generally, we stuff our arguments into an SQLActionBuilder from where they can not be read. In order to support debugging, we can use the extractArguments method which will iterate through action builder and extract a string version of the argument.

  25. object StorageFactory
  26. object StorageSingleSetup

    Storage setup for nodes with a single writer to the database.

    Storage setup for nodes with a single writer to the database. MUST NOT be used for replicated nodes, use StorageMultiFactory instead.

  27. object TransactionalStoreUpdate
  28. object WithDbLock

Ungrouped