use of com.hazelcast.concurrent.countdownlatch.CountDownLatchService in project hazelcast by hazelcast.
the class CountDownLatchBackupOperation method run.
@Override
public void run() throws Exception {
CountDownLatchService service = getService();
service.setCountDirect(name, count);
}
use of com.hazelcast.concurrent.countdownlatch.CountDownLatchService in project hazelcast by hazelcast.
the class PartitionControlledIdTest method testCountDownLatch.
@Test
public void testCountDownLatch() throws Exception {
String partitionKey = "hazelcast";
HazelcastInstance hz = getHazelcastInstance(partitionKey);
ICountDownLatch countDownLatch = hz.getCountDownLatch("countdownlatch@" + partitionKey);
countDownLatch.trySetCount(1);
assertEquals("countdownlatch@" + partitionKey, countDownLatch.getName());
assertEquals(partitionKey, countDownLatch.getPartitionKey());
CountDownLatchService service = getNodeEngine(hz).getService(CountDownLatchService.SERVICE_NAME);
assertTrue(service.containsLatch(countDownLatch.getName()));
}
Aggregations