Class

com.lightbend.constructr.coordination.zookeeper

ZookeeperCoordination

Related Doc: package zookeeper

Permalink

final class ZookeeperCoordination extends Coordination

A coordination service for ConstructR that uses Zookeeper as the distributed data store.

The locking mechanism is using the InterProcessSemaphoreMutex lock from the Apache Curator library in combination with an additional lock file to store the TTL.

Zookeeper does not support the concept that keys can expiry based on a TTL. Therefore, this implementation is using Instant to represent a TTL. The instant value is stored inside the key as a data object. It is stored in Zookeeper as milliseconds, converted to a byte array and then encoded as a Base64 string. The TTL in milliseconds represents the time elapsed since 1970-01-01T00:00:00 UTC. Because TTL value is always converted into the UTC time zone, it can be safely used across different time zones.

Linear Supertypes
Coordination, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZookeeperCoordination
  2. Coordination
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ZookeeperCoordination(clusterName: String, system: ActorSystem)

    Permalink

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def addSelf(self: Address, ttl: FiniteDuration): Future[Done]

    Permalink
    Definition Classes
    ZookeeperCoordination → Coordination
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def getNodes(): Future[Set[Address]]

    Permalink
    Definition Classes
    ZookeeperCoordination → Coordination
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def lock(self: Address, ttl: FiniteDuration): Future[Boolean]

    Permalink
    Definition Classes
    ZookeeperCoordination → Coordination
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def refresh(self: Address, ttl: FiniteDuration): Future[Done]

    Permalink
    Definition Classes
    ZookeeperCoordination → Coordination
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Coordination

Inherited from AnyRef

Inherited from Any

Ungrouped