Packages

p

org.dmonix

consul

package consul

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. consul
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. class CASLong extends AnyRef

    Implements atomic distributed Long using optimistic locking mechanism.

    Implements atomic distributed Long using optimistic locking mechanism. The principle of changing the persisted counter/long value is to: 1) read the value from Consul including the latest ModificationIndex. 2) store the updated value to Consul using compare-and-set with the read ModificationIndex. Should the write fail due to concurrency issues, we loop back to step 1 and try again. Generally all operations will fail if there is no such key/path or the key doesn't have a numerical value.

  2. trait Candidate extends AnyRef

    Represents a candidate in the leader election

  3. class Consul extends AnyRef

    Encapsulates functions towards Consul.

  4. trait ElectionObserver extends AnyRef

    Observer to be notified for changes in election state.

  5. class Semaphore extends AnyRef

    A semaphore is a construction to control access to a common resource in a concurrent system.

    A semaphore is a construction to control access to a common resource in a concurrent system. The semaphore in this library allows for creation of a distributed lock. In principle a semaphore is initiated with 1..n permits, instances of a semaphore then try to acquire one permit either succeeding or failing in case there are no more permits left to take. The simplest form is a binary semaphore which has only one permit thus only allowing a single instance to acquire a permit. Semaphores are traditionally used to control access to a protected source like a database or some task that only should be executed by a single process.

    Each instance of the Semaphore class can hold exactly 0 or 1 permit thus invoking any of the tryAcquire functions mulitple times will not acquire additional permits.

  6. type SessionID = String

Value Members

  1. object CASLong

    Companion object to CASLong

  2. object Consul

    Companion object to Consul

  3. object LeaderElection

    Factory for creating candidates for leader election

  4. object Semaphore

    Companion object to Semaphore

Inherited from AnyRef

Inherited from Any

Ungrouped