LockManager { public void blockRequestOnShard(String shardId) { trace("[{}] Block requests on shard : {}", gondola.getHostId(), shardId); shardLocks.putIfAbsent(shardId, 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();  }
@Test public void testBlockRequestOnCluster() throws Exception { lockManager.blockRequestOnShard("c1"); assertTrue(checkBlocked(1000,"c1")); }