diff --git a/src/main/java/org/redisson/cluster/ClusterSlotRange.java b/src/main/java/org/redisson/cluster/ClusterSlotRange.java index 3b913f513..6ad312645 100644 --- a/src/main/java/org/redisson/cluster/ClusterSlotRange.java +++ b/src/main/java/org/redisson/cluster/ClusterSlotRange.java @@ -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. @@ -33,6 +33,10 @@ public class ClusterSlotRange { public int getEndSlot() { return endSlot; } + + public int size() { + return endSlot - startSlot + 1; + } public boolean isOwn(int slot) { return slot >= startSlot && slot <= endSlot;