Class

de.leanovate.play.etcd

EtcdOperations

Related Doc: package etcd

Permalink

class EtcdOperations extends AnyRef

Collection of patterns one might use in combination with etcd

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. EtcdOperations
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new EtcdOperations(etcdClient: EtcdClient)

    Permalink
    Annotations
    @Inject()

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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def dequeueValue(dirKey: String): Future[String]

    Permalink

    Dequeue a value when (mis)using etcd as queueing service.

    Dequeue a value when (mis)using etcd as queueing service.

    The queue is supposed to behave like a fifo and ony once client is supposed to receive the value.

    dirKey

    the directory node to use for queuing

    returns

    dequed value

  7. def enqueueValue(dirKey: String, value: String, ttl: Option[Long] = None): Future[String]

    Permalink

    Enqueue a value when (mis)using etcd as queueing service.

    Enqueue a value when (mis)using etcd as queueing service.

    The queue is supposed to behave like a fifo and ony once client is supposed to receive the value.

    dirKey

    the directory node to use for queuing

    value

    the value to enqueue

    ttl

    Optional time to live of the value

    returns

    the key of the enqueued node

  8. final def eq(arg0: AnyRef): Boolean

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. def getValues(key: String): Future[Seq[String]]

    Permalink

    Get value helper.

    Get value helper.

    Value nodes will result in a sequence with one element. If node does not exists, result will be empty. if it is a directory a the values of all child value nodes are returned

    key

    The key to lookup

    returns

    All values found at key

  13. def hashCode(): Int

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

    Permalink
    Definition Classes
    Any
  15. def lock[T](key: String, ttl: Option[Long] = None)(block: ⇒ T): Future[Try[T]]

    Permalink

    Lock a code block via etcd.

    Lock a code block via etcd.

    I.e. only one client is supposed to run a block at a time.

    key

    The key to use for locking (will become a value key)

    ttl

    Optional time to live of the key (recommended to prevent deadlocks in case of a major failure)

    block

    The code block requiring cluster-wide synchronization

    returns

    result of the block

  16. final def ne(arg0: AnyRef): Boolean

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def transformValue(key: String, transformation: (String) ⇒ String): Future[String]

    Permalink

    Perform an atomic transformation of a value node.

    Perform an atomic transformation of a value node.

    key

    The key of the node to transform

    transformation

    The transformation (might be called multiple times, depending how many other clients are trying to do this)

    returns

    The value after the transformation

  22. def tryLock[T](key: String, ttl: Option[Long])(block: ⇒ T): Future[(Long, Option[Try[T]])]

    Permalink

    Try to run a code block with a lock.

    Try to run a code block with a lock.

    I.e. only one client is supposed to run a block at a time. If another client is currently holding the lock, the block is not executed.

    key

    The key to use for locking (will become a value key)

    ttl

    Optional time to live of the key (recommended to prevent deadlocks in case of a major failure)

    block

    The code block requiring cluster-wide synchronization

    returns

    etcd index of the try, result of the block

  23. def tryTransformValue(key: String, transformation: (String) ⇒ String): Future[(Boolean, String)]

    Permalink

    Tries an atomic transformation of a value node.

    Tries an atomic transformation of a value node.

    The transformation is only tried once and might fail.

    key

    The key of the node to transform

    transformation

    The transformation

    returns

    The current value of the and if the transformation was successful

  24. final def wait(): Unit

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

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

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

Inherited from AnyRef

Inherited from Any

Ungrouped