Package

com.lightbend.constructr.coordination

zookeeper

Permalink

package zookeeper

Visibility
  1. Public
  2. All

Type Members

  1. final class ZookeeperCoordination extends Coordination

    Permalink

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

    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.

Ungrouped