com.twitter.finagle.memcached.migration

MigrationClient

class MigrationClient extends ProxyClient with cacheresolver.ZookeeperStateMonitor

Migration client. This client manages a two cache clients representing source and destination cache pool. Depending on the migration state, this client may send dark traffic to destination pool to warm up the cache, or send light traffic to destination pool and fall back to original pool for cache misses. The state transitioning is controlled by operator by setting corresponding metadata in zookeeper.

Linear Supertypes
cacheresolver.ZookeeperStateMonitor, ProxyClient, Client, BaseClient[Buf], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MigrationClient
  2. ZookeeperStateMonitor
  3. ProxyClient
  4. Client
  5. BaseClient
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new MigrationClient(oldClient: Client, newClient: Client, zkPath: String, zkClient: ZooKeeperClient, statsReceiver: StatsReceiver = ...)

Type Members

  1. class FrontendClient extends ProxyClient

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def adapt[T](bijection: Bijection[Buf, T]): BaseClient[T]

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

    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
    ProxyClientBaseClient
  8. def add(key: String, value: Buf): Future[Boolean]

    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
  9. def append(key: String, flags: Int, expiry: Time, value: Buf): Future[Boolean]

    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
    ProxyClientBaseClient
  10. def append(key: String, value: Buf): Future[Boolean]

    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
  11. def applyZKChildren(children: List[String]): Unit

    Definition Classes
    ZookeeperStateMonitor
  12. def applyZKData(data: Array[Byte]): Unit

    Definition Classes
    MigrationClient → ZookeeperStateMonitor
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def bufferToType(v: Buf): Buf

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

    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

    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
    ProxyClientBaseClient
  16. def checkAndSet(key: String, value: Buf, casUnique: Buf): Future[CasResult]

    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
  17. def clone(): AnyRef

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

    Decrement a key.

    Decrement a key. Interpret the value as an JLong if it is parseable. This operation has no effect if there is no value there already.

    Definition Classes
    ProxyClientBaseClient
  19. def decr(key: String): Future[Option[Long]]

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

    Remove a key.

    Remove a key.

    returns

    true if deleted, false if not found

    Definition Classes
    ProxyClientBaseClient
  21. final def eq(arg0: AnyRef): Boolean

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

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

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

    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
  25. def get(key: String): Future[Option[Buf]]

    Get a key from the server.

    Get a key from the server.

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

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

    Get a set of keys from the server.

    Get a set of keys from the server. Returns a Future[GetResult] that encapsulates hits, misses and failures.

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

    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
  29. def gets(key: String): Future[Option[(Buf, Buf)]]

    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
  30. def getsResult(keys: Iterable[String]): Future[GetsResult]

    Get a set of keys from the server.

    Get a set of keys from the server. Returns a Future[GetsResult] that encapsulates hits, misses and failures. This variant includes the casToken from memcached.

    Definition Classes
    ProxyClientBaseClient
  31. def hashCode(): Int

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

    Increment a key.

    Increment a key. Interpret the value as an Long if it is parseable. This operation has no effect if there is no value there already.

    Definition Classes
    ProxyClientBaseClient
  33. def incr(key: String): Future[Option[Long]]

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

    Definition Classes
    Any
  35. def loadZKChildren: () ⇒ Unit

    Definition Classes
    ZookeeperStateMonitor
  36. def loadZKData: () ⇒ Unit

    Definition Classes
    ZookeeperStateMonitor
  37. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  38. final def notify(): Unit

    Definition Classes
    AnyRef
  39. final def notifyAll(): Unit

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

    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
    ProxyClientBaseClient
  41. def prepend(key: String, value: Buf): Future[Boolean]

    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
  42. var proxyClient: FrontendClient

    Definition Classes
    MigrationClientProxyClient
  43. def quit(): Future[Unit]

    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
  44. def reconnectZK: () ⇒ Unit

    Definition Classes
    ZookeeperStateMonitor
  45. def release(): Unit

    release the underlying service(s)

    release the underlying service(s)

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

    Replace bytes on an existing key.

    Replace bytes on an existing key. If the key doesn't exist, the operation has no effect.

    returns

    true if stored, false if not stored

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

    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
  48. def set(key: String, flags: Int, expiry: Time, value: Buf): Future[Unit]

    Store a key.

    Store a key. Override an existing value.

    returns

    true

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

    Store a key.

    Store a key. Override an existing values.

    returns

    true

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

    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
    ProxyClientBaseClient
  51. def stats(): Future[Seq[String]]

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

    Definition Classes
    BaseClient
  53. val statsReceiver: StatsReceiver

    Attributes
    protected
    Definition Classes
    MigrationClient → ZookeeperStateMonitor
  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  55. def toString(): String

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

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

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

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

    Adaptor to use Array[Byte] as values

    Adaptor to use Array[Byte] as values

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

    Adaptor to use String as values

    Adaptor to use String as values

    Definition Classes
    Client
  61. val zkClient: ZooKeeperClient

    Attributes
    protected
    Definition Classes
    MigrationClient → ZookeeperStateMonitor
  62. val zkPath: String

    Attributes
    protected
    Definition Classes
    MigrationClient → ZookeeperStateMonitor

Deprecated Value Members

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

    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]

    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 cacheresolver.ZookeeperStateMonitor

Inherited from ProxyClient

Inherited from Client

Inherited from BaseClient[Buf]

Inherited from AnyRef

Inherited from Any

Ungrouped