A friendly client to talk to a Memcached server.
A friendly client to talk to a Memcached server.
The Memcached protocol docs for details on the API.
Cache pool config data format Currently this data format is only used by ZookeeperCachePoolManager to read the config data from zookeeper serverset parent node, and the expected cache pool size is the only attribute we need for now.
Cache pool config data format Currently this data format is only used by ZookeeperCachePoolManager to read the config data from zookeeper serverset parent node, and the expected cache pool size is the only attribute we need for now. In the future this can be extended for other config attributes like cache pool migrating state, backup cache servers list, or replication role, etc
The result of a check and set command.
The result of a check and set command.
A Client connected to an individual Memcached server.
A Client connected to an individual Memcached server.
Evaluates a given Memcached operation and returns the result.
Map-based mock client for testing
Map-based mock client for testing
Note: expiry and flags are ignored on update operations.
PHP memcache-client (memcache.so) compatible client.
Builder for memcache-client (memcache.so) compatible client.
A partitioned client is a client that delegates to an actual client based on the key value.
A partitioned client is a client that delegates to an actual client based on the key value. Subclasses implement clientOf to choose the Client.
This class is designed to support replicated memcached setups.
This class is designed to support replicated memcached setups. It supports a limited subset of operations (just get, set, and delete).
Ruby memcache-client (MemCache) compatible client.
Builder for memcache-client (MemCache) compatible client.
Cache pool based on a static list
Twemcache commands implementation.
Twemcache commands implementation. This trait can only be mixed into a memcache client implementation as extension.
Twemcache commands implemenation for a partitioned client.
Twemcache commands implemenation for a partitioned client. This trait can only be mixed into a ParitionedClient that is delegating twemcache compatible clients.
A com.twitter.finagle.Resolver for resolving destination names associated with Twitter cache pools.
Indicates that an error occurred while resolving a cache address.
Indicates that an error occurred while resolving a cache address. See com.twitter.finagle.memcached.TwitterCacheResolver for details.
Zookeeper based cache pool cluster with a serverset as the underlying pool.
Zookeeper based cache pool cluster with a serverset as the underlying pool. It will monitor the underlying serverset changes and report the detected underlying pool size. It will also monitor the serverset parent node for cache pool config data, cache pool cluster update will be triggered whenever cache config data change event happens.
A zk monitor trait that assists with monitoring a given zk path for any node data change, in which the provided zk data handling implementation will be invoked.
A zk monitor trait that assists with monitoring a given zk path for any node data change, in which the provided zk data handling implementation will be invoked.
This monitor will maintain a queue so that every work item triggered by zk event will be processed in an order with a back off policy. It also set-up a zookeeper connection watcher by default to re-set the data change watcher even during zk re-connect.
The monitor will set-up all watcher properly kick off the loop to process future event; you can also invoke loadZKData() in your class anytime to force reading zk data and apply it.
Example use cases are: - zookeeper based CachePoolCluster uses this to monitor cache pool members change - zookeeper based MigrationClient uses this ot monitor migration state transitioning
(Since version 2015-02-22) Use the com.twitter.finagle.Memcached builder
An in-process memcached server.
An in-process memcached server.
(Since version 7.0.0) Moved into test
Cache specific cluster implementation.
Cache specific cluster implementation. - A cache pool is a Cluster of cache nodes. - cache pool requires a underlying pool manager as the source of the cache nodes - the underlying pool manager encapsulates logic of monitoring the cache node changes and deciding when to update the cache pool cluster
Cache pool config data object
ZooKeeper based cache pool cluster companion object
Package replication implements a base cache client that can manage multiple cache replicas.
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.