Class

com.twitter.finagle.memcached.replication

SimpleReplicationClient

Related Doc: package replication

Permalink

class SimpleReplicationClient extends Client

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SimpleReplicationClient
  2. Client
  3. BaseClient
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SimpleReplicationClient(clients: Seq[Client], statsReceiver: StatsReceiver = NullStatsReceiver)

    Permalink
  2. new SimpleReplicationClient(underlying: BaseReplicationClient)

    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 adapt[T](bijection: Bijection[Buf, T]): BaseClient[T]

    Permalink
    Definition Classes
    Client
  5. def add(key: String, flags: Int, expiry: Time, value: Buf): Future[Boolean]

    Permalink

    Add a new key to all replicas, succeed only if all replicas succeed.

    Add a new key to all replicas, succeed only if all replicas succeed.

    returns

    true if stored, false if not stored

    Definition Classes
    SimpleReplicationClientBaseClient
  6. def add(key: String, value: Buf): Future[Boolean]

    Permalink

    Store a key but only if it doesn't already exist on the server.

    Store a key but only if it doesn't already exist on the server.

    returns

    true if stored, false if not stored

    Definition Classes
    BaseClient
  7. def append(key: String, flags: Int, expiry: Time, value: Buf): Future[Boolean]

    Permalink

    Append bytes to the end of an existing key.

    Append bytes to the end of an existing key. If the key doesn't exist, the operation has no effect.

    returns

    true if stored, false if not stored

    Definition Classes
    SimpleReplicationClientBaseClient
  8. def append(key: String, value: Buf): Future[Boolean]

    Permalink

    Append a set of bytes to the end of an existing key.

    Append a set of bytes to the end of an existing key. If the key doesn't exist, the operation has no effect.

    returns

    true if stored, false if not stored

    Definition Classes
    BaseClient
  9. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  10. def bufferToType(v: Buf): Buf

    Permalink
    Definition Classes
    ClientBaseClient
  11. def checkAndSet(key: String, flags: Int, expiry: Time, value: Buf, casUnique: Buf): Future[CasResult]

    Permalink

    Check and set a key, succeed only if all replicas succeed.

    Check and set a key, succeed only if all replicas succeed.

    returns

    Stored if the operation was successful, Exists if the operation failed because someone else had changed the value, or NotFound if the key was not found in the cache.

    Definition Classes
    SimpleReplicationClientBaseClient
  12. def checkAndSet(key: String, value: Buf, casUnique: Buf): Future[CasResult]

    Permalink

    Perform a CAS operation on the key, only if the value has not changed since the value was last retrieved.

    Perform a CAS operation on the key, only if the value has not changed since the value was last retrieved. This is enforced by passing a casUnique token extracted from a gets command. If the casUnique token matches the one on the server, the value is replaced. We treat the "cas unique" token opaquely, but in reality it is a string-encoded u64.

    returns

    Stored if the operation was successful, Exists if the operation failed because someone else had changed the value, or NotFound if the key was not found in the cache.

    Definition Classes
    BaseClient
  13. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  14. def decr(key: String, delta: Long): Future[Option[Long]]

    Permalink

    Decrease an existing key in all replicas, succeed only if all replicas succeed.

    Decrease an existing key in all replicas, succeed only if all replicas succeed.

    Definition Classes
    SimpleReplicationClientBaseClient
  15. def decr(key: String): Future[Option[Long]]

    Permalink
    Definition Classes
    BaseClient
  16. def delete(key: String): Future[Boolean]

    Permalink

    Delete a key from all replicas, succeed only if all replicas succeed.

    Delete a key from all replicas, succeed only if all replicas succeed.

    returns

    true if deleted, false if not found

    Definition Classes
    SimpleReplicationClientBaseClient
  17. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def get(keys: Iterable[String]): Future[Map[String, Buf]]

    Permalink

    Get a set of keys from the server.

    Get a set of keys from the server.

    returns

    a Map[String, T] of all of the keys that the server had.

    Definition Classes
    BaseClient
  21. def get(key: String): Future[Option[Buf]]

    Permalink

    Get a key from the server.

    Get a key from the server.

    Definition Classes
    BaseClient
  22. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  23. def getResult(keys: Iterable[String]): Future[GetResult]

    Permalink

    Returns the first result found within all replicas, or miss/failure depends on the last replica

    Returns the first result found within all replicas, or miss/failure depends on the last replica

    Definition Classes
    SimpleReplicationClientBaseClient
  24. def gets(keys: Iterable[String]): Future[Map[String, (Buf, Buf)]]

    Permalink

    Get a set of keys from the server, together with a "cas unique" token.

    Get a set of keys from the server, together with a "cas unique" token. The token is treated opaquely by the memcache client but is in reality a string-encoded u64.

    returns

    a Map[String, (T, Buf)] of all the keys the server had, together with their "cas unique" token

    Definition Classes
    BaseClient
  25. def gets(key: String): Future[Option[(Buf, Buf)]]

    Permalink

    Get a key from the server, with a "cas unique" token.

    Get a key from the server, with a "cas unique" token. The token is treated opaquely by the memcache client but is in reality a string-encoded u64.

    Definition Classes
    BaseClient
  26. def getsResult(keys: Iterable[String]): Future[GetsResult]

    Permalink

    Only returns the consistent result from all replicas; if the data is inconsistent, this client simply returns nothing just like key missing; if any failure occurs, this method returns failure as there's a great chance the check-and-set won't succeed.

    Only returns the consistent result from all replicas; if the data is inconsistent, this client simply returns nothing just like key missing; if any failure occurs, this method returns failure as there's a great chance the check-and-set won't succeed.

    Definition Classes
    SimpleReplicationClientBaseClient
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. def incr(key: String, delta: Long): Future[Option[Long]]

    Permalink

    Increase an existing key in all replicas, succeed only if all replicas succeed.

    Increase an existing key in all replicas, succeed only if all replicas succeed.

    Definition Classes
    SimpleReplicationClientBaseClient
  29. def incr(key: String): Future[Option[Long]]

    Permalink
    Definition Classes
    BaseClient
  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  34. def prepend(key: String, flags: Int, expiry: Time, value: Buf): Future[Boolean]

    Permalink

    Prepend bytes to the beginning of an existing key.

    Prepend bytes to the beginning of an existing key. If the key doesn't exist, the operation has no effect.

    returns

    true if stored, false if not stored

    Definition Classes
    SimpleReplicationClientBaseClient
  35. def prepend(key: String, value: Buf): Future[Boolean]

    Permalink

    Prepend a set of bytes to the beginning of an existing key.

    Prepend a set of bytes to the beginning of an existing key. If the key doesn't exist, the operation has no effect.

    returns

    true if stored, false if not stored

    Definition Classes
    BaseClient
  36. def quit(): Future[Unit]

    Permalink

    Send a quit command to the server.

    Send a quit command to the server. Alternative to release, for protocol compatability.

    returns

    none

    Definition Classes
    BaseClient
  37. def release(): Unit

    Permalink

    release the underlying service(s)

    release the underlying service(s)

    Definition Classes
    SimpleReplicationClientBaseClient
  38. def replace(key: String, flags: Int, expiry: Time, value: Buf): Future[Boolean]

    Permalink

    Replace an existing key in all replicas, succeed only if all replicas succeed.

    Replace an existing key in all replicas, succeed only if all replicas succeed.

    returns

    true if stored, false if not stored

    Definition Classes
    SimpleReplicationClientBaseClient
  39. def replace(key: String, value: Buf): Future[Boolean]

    Permalink

    Replace an item if it exists.

    Replace an item if it exists. If it doesn't exist, the operation has no effect.

    returns

    true if stored, false if not stored

    Definition Classes
    BaseClient
  40. def set(key: String, flags: Int, expiry: Time, value: Buf): Future[Unit]

    Permalink

    Store a key in all replicas, succeed only if all replicas succeed.

    Store a key in all replicas, succeed only if all replicas succeed.

    returns

    true

    Definition Classes
    SimpleReplicationClientBaseClient
  41. def set(key: String, value: Buf): Future[Unit]

    Permalink

    Store a key.

    Store a key. Override an existing values.

    returns

    true

    Definition Classes
    BaseClient
  42. def stats(args: Option[String]): Future[Seq[String]]

    Permalink

    Send a stats command with optional arguments to the server

    Send a stats command with optional arguments to the server

    returns

    a sequence of strings, each of which is a line of output

    Definition Classes
    SimpleReplicationClientBaseClient
  43. def stats(): Future[Seq[String]]

    Permalink
    Definition Classes
    BaseClient
  44. def stats(args: String): Future[Seq[String]]

    Permalink
    Definition Classes
    BaseClient
  45. final def synchronized[T0](arg0: ⇒ T0): T0

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. def withBytes: BaseClient[Array[Byte]]

    Permalink

    Adaptor to use Array[Byte] as values

    Adaptor to use Array[Byte] as values

    Definition Classes
    Client
  51. def withStrings: BaseClient[String]

    Permalink

    Adaptor to use String as values

    Adaptor to use String as values

    Definition Classes
    Client

Deprecated Value Members

  1. final def cas(key: String, value: Buf, casUnique: Buf): Future[Boolean]

    Permalink

    Perform a CAS operation on the key, only if the value has not changed since the value was last retrieved, and casUnique extracted from a gets command.

    Perform a CAS operation on the key, only if the value has not changed since the value was last retrieved, and casUnique extracted from a gets command. We treat the "cas unique" token opaquely, but in reality it is a string-encoded u64.

    returns

    true if replaced, false if not

    Definition Classes
    BaseClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-12-10) BaseClient.cas deprecated in favor of checkAndSet

    Note

    this is superceded by checkAndSet which returns a higher fidelity return value

  2. final def cas(key: String, flags: Int, expiry: Time, value: Buf, casUnique: Buf): Future[Boolean]

    Permalink

    Perform a CAS operation on the key, only if the value has not changed since the value was last retrieved, and casUnique extracted from a gets command.

    Perform a CAS operation on the key, only if the value has not changed since the value was last retrieved, and casUnique extracted from a gets command. We treat the "cas unique" token opaquely, but in reality it is a string-encoded u64.

    returns

    true if replaced, false if not

    Definition Classes
    BaseClient
    Annotations
    @deprecated
    Deprecated

    (Since version 2015-12-10) BaseClient.cas deprecated in favor of checkAndSet

    Note

    this is superceded by checkAndSet which returns a higher fidelity return value

Inherited from Client

Inherited from BaseClient[Buf]

Inherited from AnyRef

Inherited from Any

Ungrouped