Packages

package ha

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. trait ConnectionInitializer extends AnyRef

    This functionality initializes a worker Connection, and clears it for further usage.

    This functionality initializes a worker Connection, and clears it for further usage. This only needs to be done once at the beginning of the Connection life-cycle Initialization errors are signaled by throwing an exception.

  2. final case class HaConfig(mainLockAcquireRetryTimeout: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMillis(500), workerLockAcquireRetryTimeout: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMillis(500), workerLockAcquireMaxRetries: NonNegativeLong = NonNegativeLong.tryCreate(1000), mainLockCheckerPeriod: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMillis(1000), mainLockCheckerJdbcNetworkTimeout: NonNegativeFiniteDuration = NonNegativeFiniteDuration.ofMillis(10000), indexerLockId: Int = 0x646d6c0, indexerWorkerLockId: Int = 0x646d6c1) extends Product with Serializable
  3. trait HaCoordinator extends AnyRef

    To add High Availability related features to a program, which intends to use database-connections to do it's work.

    To add High Availability related features to a program, which intends to use database-connections to do it's work. Features include:

    • Safety: mutual exclusion of these programs ensured by DB locking mechanisms
    • Availability: release of the exclusion is detected by idle programs, which start competing for the lock to do their work.
  4. final case class Handle(completed: Future[Unit], killSwitch: KillSwitch) extends Product with Serializable

    A handle of a running program

    A handle of a running program

    completed

    will complete right after the program completed

    • if no KillSwitch used,
      • it will complete successfully as program successfully ends
      • it will complete with the same failure that failed the program
    • if KillSwitch aborted, this completes with the same Throwable
    • if KillSwitch shut down, this completes successfully After signalling completion, the program finished it's execution and has released all resources it acquired.
    killSwitch

    to signal abortion and shutdown

  5. class KillSwitchCaptor extends KillSwitch with NamedLogging

    This KillSwitch captures it's usage in it's internal state, which can be queried.

    This KillSwitch captures it's usage in it's internal state, which can be queried. Captured state is available with the 'state' method.

    Rules of state transitions: - Shutdown is always the final state - From multiple aborts, the last abort wins

    With setDelegate() we can set a delegate KillSwitch, which to usage will be replayed

  6. class PollingChecker extends AutoCloseable with NamedLogging

    A simple host of checking.

    A simple host of checking. - This will ensure that checkBody is accessed by only one caller at a time - Does periodic checking - Exposes check() for on-demand checking from the outside - If whatever check() fails, it uses killSwitch with an abort - It is also an AutoCloseable to release internal resources

  7. trait PreemptableSequence extends AnyRef

    PreemptableSequence is a helper to - facilitate the execution of a sequence of Futures, which can be stopped or aborted - provide a Handle for the client - manage the state to implement the above

  8. trait SequenceHelper extends AnyRef

    A collection of helper functions to compose a preemptable-sequence

Ungrouped