Package com.couchbase.client.core.node
Class Sdk2CompatibleMemcachedHashingStrategy
java.lang.Object
com.couchbase.client.core.node.Sdk2CompatibleMemcachedHashingStrategy
- All Implemented Interfaces:
MemcachedHashingStrategy
public class Sdk2CompatibleMemcachedHashingStrategy
extends Object
implements MemcachedHashingStrategy
This Memcached Hashing Strategy is compatible with the SDK 2 "DefaultMemcachedHashingStrategy".
It should only be used if code is migrated from Java SDK 2 to SDK 3 and access to cached documents need to be
preserved. For everything else (especially for interop with libcouchbase-based SDKs) we strongly recommend the
default StandardMemcachedHashingStrategy
.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionhash
(KetamaRingNode info, int repetition) The hash for each node based on the node information and repetition.
-
Field Details
-
INSTANCE
-
-
Method Details
-
hash
Description copied from interface:MemcachedHashingStrategy
The hash for each node based on the node information and repetition.- Specified by:
hash
in interfaceMemcachedHashingStrategy
- Parameters:
info
- the node inforepetition
- the repetition- Returns:
- the hashed node
-