com.twitter.finagle.memcached

replication

package replication

Package replication implements a base cache client that can manage multiple cache replicas.

The base replication client will forward cache command to all replicas, as well as collect and aggregate each replica's response into a ReplicationStatus object representing the replication consistency. The BaseReplicationClient will not handle the consistency between replicas in anyway, but only to report its view of the replication state. For instance, BaseReplicationClient provides interfaces similar to generic memcache client but always returns ReplicationStatus object which can be one of these three forms:

By checking the returned ReplicationStatus object, one can tell the cache replication status and then handle it with application specific logic.

In addition to a base replication client, a simple replication client wrapper that's compatible with generic cache client interface is also provided. The SimpleReplicationClient only supports a subset of all memcached commands for now, and will succeed only if the command succeed on all cache replicas. In a more complicate caching scenario, this simple/naive replication client may not be applicable.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. replication
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class BaseReplicationClient extends AnyRef

    Base replication client.

  2. case class ConsistentReplication[T](result: T) extends ReplicationStatus[T] with Product with Serializable

    Indicating a consistent state across all replicas, which comes with the agreed consistent result;

  3. case class FailedReplication[T](failureSeq: Seq[Throw[T]]) extends ReplicationStatus[T] with Product with Serializable

    indicating a failed state from all replicas, which comes with a sequence of failures from all replicas;

  4. case class InconsistentReplication[T](resultSeq: Seq[Try[T]]) extends ReplicationStatus[T] with Product with Serializable

    Indicating an inconsistent state across all replicas, which comes with a sequence of result from all replicas; each replica's result can be either Return[T] or Throw[T]

  5. case class RCasUnique(uniques: Seq[ChannelBuffer]) extends ReplicaCasUnique with Product with Serializable

  6. trait ReplicaCasUnique extends AnyRef

    Wrapping underlying replicas cas unique values for replication purpose.

  7. sealed trait ReplicationStatus[T] extends AnyRef

  8. case class SCasUnique(casUnique: ChannelBuffer) extends ReplicaCasUnique with Product with Serializable

  9. class SimpleReplicationClient extends Client

  10. case class SimpleReplicationFailure(msg: String) extends Throwable with Product with Serializable

    Simple replication client wrapper that's compatible with base memcached client.

Value Members

  1. object ReplicationClient

    Replication client helper

Inherited from AnyRef

Inherited from Any

Ungrouped