Elffuss BraidHub

kikocis/java-driver public

Cleanup method visibilities in Token class.
Changeset4f318d34b511289f199665cb89b295dacd6e7ede663ff49dbe4d94d8a5ef37b1
Authorolim7t <omichallat+github@gmail.com> · 2015-03-05 13:44 -08:00
Committerolim7t <omichallat+github@gmail.com> · 2015-03-05 15:49 -08:00
Parents2545f7762c19

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Token.java +9 −9
@@ -100,8 +100,8 @@
100100
101101 private static final BigInteger RING_END = BigInteger.valueOf(Long.MAX_VALUE);
102102 private static final BigInteger RING_LENGTH = RING_END.subtract(BigInteger.valueOf(Long.MIN_VALUE));
103- public static final M3PToken MIN_TOKEN = new M3PToken(Long.MIN_VALUE);
104- public static final M3PToken MAX_TOKEN = new M3PToken(Long.MAX_VALUE);
103+ static final M3PToken MIN_TOKEN = new M3PToken(Long.MIN_VALUE);
104+ static final M3PToken MAX_TOKEN = new M3PToken(Long.MAX_VALUE);
105105
106106 private long getblock(ByteBuffer key, int offset, int index) {
107107 int i_8 = index << 3;
@@ -202,7 +202,7 @@
202202 }
203203
204204 @Override
205- public M3PToken fromString(String tokenStr) {
205+ M3PToken fromString(String tokenStr) {
206206 return new M3PToken(Long.parseLong(tokenStr));
207207 }
208208
@@ -222,7 +222,7 @@
222222 }
223223
224224 @Override
225- public M3PToken hash(ByteBuffer partitionKey) {
225+ M3PToken hash(ByteBuffer partitionKey) {
226226 long v = murmur(partitionKey);
227227 return new M3PToken(v == Long.MIN_VALUE ? Long.MAX_VALUE : v);
228228 }
@@ -326,12 +326,12 @@
326326 }
327327
328328 @Override
329- public OPPToken hash(ByteBuffer partitionKey) {
329+ OPPToken hash(ByteBuffer partitionKey) {
330330 return new OPPToken(partitionKey);
331331 }
332332
333333 @Override
334- public List<Token> split(Token startToken, Token endToken, int numberOfSplits) {
334+ List<Token> split(Token startToken, Token endToken, int numberOfSplits) {
335335 int tokenOrder = startToken.compareTo(endToken);
336336
337337 // ]min,min] means the whole ring. However, since there is no "max token" with this partitioner, we can't come up
@@ -514,7 +514,7 @@
514514 }
515515
516516 @Override
517- public RPToken fromString(String tokenStr) {
517+ RPToken fromString(String tokenStr) {
518518 return new RPToken(new BigInteger(tokenStr));
519519 }
520520
@@ -534,7 +534,7 @@
534534 }
535535
536536 @Override
537- public RPToken hash(ByteBuffer partitionKey) {
537+ RPToken hash(ByteBuffer partitionKey) {
538538 return new RPToken(md5(partitionKey));
539539 }
540540
@@ -559,7 +559,7 @@
559559 tokens.add(new RPToken(value));
560560 return tokens;
561561 }
562- };
562+ }
563563
564564 private RPToken(BigInteger value) {
565565 this.value = value;