Search in sources :

Example 6 with CountDownLatchService

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);
}
Also used : CountDownLatchService(com.hazelcast.concurrent.countdownlatch.CountDownLatchService)

Example 7 with CountDownLatchService

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()));
}
Also used : HazelcastInstance(com.hazelcast.core.HazelcastInstance) CountDownLatchService(com.hazelcast.concurrent.countdownlatch.CountDownLatchService) ICountDownLatch(com.hazelcast.core.ICountDownLatch) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test) ParallelTest(com.hazelcast.test.annotation.ParallelTest)

Aggregations

CountDownLatchService (com.hazelcast.concurrent.countdownlatch.CountDownLatchService)7 CardinalityEstimatorService (com.hazelcast.cardinality.impl.CardinalityEstimatorService)1 ListService (com.hazelcast.collection.impl.list.ListService)1 QueueService (com.hazelcast.collection.impl.queue.QueueService)1 SetService (com.hazelcast.collection.impl.set.SetService)1 AtomicLongService (com.hazelcast.concurrent.atomiclong.AtomicLongService)1 AtomicReferenceService (com.hazelcast.concurrent.atomicreference.AtomicReferenceService)1 CountDownLatchContainer (com.hazelcast.concurrent.countdownlatch.CountDownLatchContainer)1 IdGeneratorService (com.hazelcast.concurrent.idgen.IdGeneratorService)1 LockServiceImpl (com.hazelcast.concurrent.lock.LockServiceImpl)1 SemaphoreService (com.hazelcast.concurrent.semaphore.SemaphoreService)1 HazelcastInstance (com.hazelcast.core.HazelcastInstance)1 ICountDownLatch (com.hazelcast.core.ICountDownLatch)1 DistributedDurableExecutorService (com.hazelcast.durableexecutor.impl.DistributedDurableExecutorService)1 DistributedExecutorService (com.hazelcast.executor.impl.DistributedExecutorService)1 MapService (com.hazelcast.map.impl.MapService)1 MapReduceService (com.hazelcast.mapreduce.impl.MapReduceService)1 MultiMapService (com.hazelcast.multimap.impl.MultiMapService)1 ReplicatedMapService (com.hazelcast.replicatedmap.impl.ReplicatedMapService)1 RingbufferService (com.hazelcast.ringbuffer.impl.RingbufferService)1