com.netflix.astyanax.shallows
Class EmptyPartitioner
java.lang.Object
com.netflix.astyanax.shallows.EmptyPartitioner
- All Implemented Interfaces:
- Partitioner
public class EmptyPartitioner
- extends java.lang.Object
- implements Partitioner
|
Method Summary |
java.lang.String |
getMaxToken()
|
java.lang.String |
getMinToken()
|
java.lang.String |
getTokenForKey(java.nio.ByteBuffer key)
Return the token for the specifie key |
java.lang.String |
getTokenMinusOne(java.lang.String token)
|
java.util.List<TokenRange> |
splitTokenRange(int count)
Split the entire token range into 'count' equal size segments |
java.util.List<TokenRange> |
splitTokenRange(java.lang.String first,
java.lang.String last,
int count)
Split the token range into N equal size segments and return the start token
of each segment |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EmptyPartitioner
public EmptyPartitioner()
getMinToken
public java.lang.String getMinToken()
- Specified by:
getMinToken in interface Partitioner
- Returns:
- Return the smallest token in the token space
getMaxToken
public java.lang.String getMaxToken()
- Specified by:
getMaxToken in interface Partitioner
- Returns:
- Return the largest token in the token space
getTokenMinusOne
public java.lang.String getTokenMinusOne(java.lang.String token)
- Specified by:
getTokenMinusOne in interface Partitioner
- Returns:
- Return the token immediately before this one
splitTokenRange
public java.util.List<TokenRange> splitTokenRange(java.lang.String first,
java.lang.String last,
int count)
- Description copied from interface:
Partitioner
- Split the token range into N equal size segments and return the start token
of each segment
- Specified by:
splitTokenRange in interface Partitioner
splitTokenRange
public java.util.List<TokenRange> splitTokenRange(int count)
- Description copied from interface:
Partitioner
- Split the entire token range into 'count' equal size segments
- Specified by:
splitTokenRange in interface Partitioner
getTokenForKey
public java.lang.String getTokenForKey(java.nio.ByteBuffer key)
- Description copied from interface:
Partitioner
- Return the token for the specifie key
- Specified by:
getTokenForKey in interface Partitioner