Class

com.metamx.rainer

CommitKeeper

Related Doc: package rainer

Permalink

class CommitKeeper[ValueType] extends Logging

ZooKeeper-based storage and notification for each key's most current commit. This class does not implement CommitStorage because even though many method signatures are similar, it does not provide fully journaled storage. In particular, no history is kept, and commits with empty or unparseable values are not stored.

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

Instance Constructors

  1. new CommitKeeper(curator: CuratorFramework, zkPath: String)(implicit arg0: KeyValueDeserialization[ValueType])

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

    Permalink
    Definition Classes
    Any
  5. def autoPublisher(storage: CommitStorage[ValueType], period: org.scala_tools.time.Imports.Duration, periodFuzz: Double, delay: Boolean = true, errorHandler: (Throwable, Commit[ValueType]) ⇒ Unit = ...): CommitAutoPublisher

    Permalink

    Runnable that automatically publishes commits from storage to ZK.

  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. def get(key: Key): Option[Commit[ValueType]]

    Permalink

    Get the current version of some commit key.

    Get the current version of some commit key. Returns None if the znode does not exist, but throws an exception if the znode is present and unparseable. If the znode is parseable but the payload is not, returns a normal Commit where value.isLeft.

  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. def heads: Map[Key, Commit[ValueType]]

    Permalink

    Immutable, point-in-time view of all nonempty commits.

  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. lazy val log: Logger

    Permalink
    Definition Classes
    Logging
  16. def mirror(): Var[Map[Key, Commit[ValueType]]]

    Permalink

    Live-updating view of all present commits.

    Live-updating view of all present commits. The first value seen by the returned Var will be a fully-initialized cache. Future values will reflect each update in the order they are seen. This behavior is backed by a Curator PathChildrenCache.

    Note that absence of a commit in the map is not a guarantee of true absence of the commit. Commits can be spuriously missing due to parsing errors.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  20. def save(commit: Commit[ValueType]): Unit

    Permalink

    Publish a new commit to ZooKeeper.

    Publish a new commit to ZooKeeper. Prevents rollbacks, when possible, using the commit's version number.

    Note

    It's much more possible to prevent rollbacks when commit payloads are always nonempty. This is because empty commits are removed from ZooKeeper, which means we cannot distinguish them from commits that have simply never been published at all.

  21. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

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

Inherited from Logging

Inherited from AnyRef

Inherited from Any

Ungrouped