public static class ConsistentHash.Member extends Object
Member
instances if the number of segments
differs per supported command type.Constructor and Description |
---|
ConsistentHash.Member(String nodeName,
int segmentCount,
Set<String> supportedCommandTypes)
Constructs a new member with given
nodeName , segmentCount supporting given
supportedCommandTypes . |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
Set<String> |
hashes()
Returns the hash values assigned to this member.
|
String |
name()
Returns the name of this member.
|
int |
segmentCount()
Returns the number of segments this member has on the consistent hash ring.
|
Set<String> |
supportedCommands()
Returns the set of commands supported by this member.
|
public ConsistentHash.Member(String nodeName, int segmentCount, Set<String> supportedCommandTypes)
nodeName
, segmentCount
supporting given
supportedCommandTypes
.nodeName
- The name of the nodesegmentCount
- The number of segments the node should have on the hash ringsupportedCommandTypes
- The commands supported by this nodepublic String name()
Member
instances if the number of segments
differs per supported command type. Therefore, the name should not be considered an absolutely unique value.public Set<String> supportedCommands()
public int segmentCount()
public Set<String> hashes()
Copyright © 2010-2014. All Rights Reserved.