@Test public void testBlockRequestOnBuckets() throws Exception { lockManager.blockRequestOnBuckets(Range.closed(1, 100)); assertTrue(checkBlocked(1,"c1")); assertFalse(checkBlocked(101,"c1")); }
public void blockRequestOnBuckets(Range<Integer> splitRange) { trace("[{}] Block requests on buckets : {}", gondola.getHostId(), splitRange); bucketLocks.putIfAbsent(splitRange, new CountDownLatch(1)); }
LockManager { public void blockRequestOnBuckets(Range<Integer> splitRange) { trace("[{}] Block requests on buckets : {}", gondola.getHostId(), splitRange); bucketLocks.putIfAbsent(splitRange, new CountDownLatch(1)); } }
LockManager { public void blockRequestOnBuckets(Range<Integer> splitRange) { trace("[{}] Block requests on buckets : {}", gondola.getHostId(), splitRange); bucketLocks.putIfAbsent(splitRange, new CountDownLatch(1)); } LockManager(Gondola gondola); }
LockManager { public void blockRequestOnBuckets(Range<Integer> splitRange) { trace("[{}] Block requests on buckets : {}", gondola.getHostId(), splitRange); bucketLocks.putIfAbsent(splitRange, new CountDownLatch(1)); } 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(); }
LockManager { public void blockRequestOnBuckets(Range<Integer> splitRange) { trace("[{}] Block requests on buckets : {}", gondola.getHostId(), splitRange); bucketLocks.putIfAbsent(splitRange, new CountDownLatch(1)); } 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();  }