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 defaultStandardMemcachedHashingStrategy
.
-
-
Field Summary
Fields Modifier and Type Field Description static Sdk2CompatibleMemcachedHashingStrategy
INSTANCE
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
hash(NodeInfo info, int repetition)
The hash for each node based on the node information and repetition.
-
-
-
Field Detail
-
INSTANCE
public static Sdk2CompatibleMemcachedHashingStrategy INSTANCE
-
-
Method Detail
-
hash
public String hash(NodeInfo info, int repetition)
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
-
-