size method added to ClusterSlotRange

pull/544/head
Nikita 9 years ago
parent f36b92c363
commit 5ff052cc12

@ -1,5 +1,5 @@
/**
* Copyright 2016 Nikita Koksharov
* Copyright 2014 Nikita Koksharov, Nickolay Borbit
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,6 +34,10 @@ public class ClusterSlotRange {
return endSlot;
}
public int size() {
return endSlot - startSlot + 1;
}
public boolean isOwn(int slot) {
return slot >= startSlot && slot <= endSlot;
}

Loading…
Cancel
Save