diff options
Diffstat (limited to 'mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java')
-rwxr-xr-x | mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java b/mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java index 314248f..4122623 100755 --- a/mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java +++ b/mdbc-server/src/main/java/org/onap/music/mdbc/DatabasePartition.java @@ -48,12 +48,18 @@ public class DatabasePartition { * The only requirement is that the ranges are not overlapping. */ - public DatabasePartition() { - this(new HashSet<Range>(),null,""); - } public DatabasePartition(UUID mriIndex) { - this(new HashSet<Range>(), mriIndex,""); + this(new HashSet<Range>(), mriIndex); + } + + /** + * Create unlocked partition + * @param ranges + * @param mriIndex + */ + public DatabasePartition(Set<Range> ranges, UUID mriIndex) { + this(ranges, mriIndex, null); } public DatabasePartition(Set<Range> knownRanges, UUID mriIndex, String lockId) { @@ -90,7 +96,9 @@ public class DatabasePartition { } - public synchronized boolean isLocked(){return lockId != null && !lockId.isEmpty(); } + public synchronized boolean isLocked(){ + return lockId != null && !lockId.isEmpty(); + } public synchronized boolean isReady() { return ready; |