LockManager { public void unblockRequestOnBuckets(Range<Integer> splitRange) { trace("[{}] Unblock requests on buckets : {}", gondola.getHostId(), splitRange); CountDownLatch lock = bucketLocks.remove(splitRange); if (lock != null) { lock.countDown(); } } LockManager(Gondola gondola); boolean filterRequest(int bucketId, String shardId); long unblockRequestOnShard(String shardId); void blockRequestOnShard(String shardId); void unblockRequest(); void blockRequest(); void unblockRequestOnBuckets(Range<Integer> splitRange); void blockRequestOnBuckets(Range<Integer> splitRange); CountDownLatch getGlobalLock(); Map<String, CountDownLatch> getShardLocks(); Map<Range<Integer>, CountDownLatch> getBucketLocks();  }
@Test public void testUnblockRequestOnBuckets() throws Exception { lockManager.blockRequestOnBuckets(Range.closed(1, 100)); assertTrue(checkBlocked(1,"c1")); lockManager.unblockRequestOnBuckets(Range.closed(1, 100)); assertFalse(checkBlocked(1,"c1")); lockManager.unblockRequestOnBuckets(Range.closed(1, 100)); assertFalse(checkBlocked(1,"c1")); }