Package com.hazelcast.concurrent.countdownlatch

Examples of com.hazelcast.concurrent.countdownlatch.CountDownLatchService


        super(name);
    }

    @Override
    public Operation getBackupOperation() {
        CountDownLatchService service = getService();
        CountDownLatchInfo latch = service.getLatch(name);
        int count = latch != null ? latch.getCount() : 0;
        return new CountDownLatchBackupOperation(name, count);
    }
View Full Code Here


        super(name);
    }

    @Override
    public void run() throws Exception {
        CountDownLatchService service = getService();
        service.countDown(name);
        int count = service.getCount(name);
        shouldNotify = count == 0;
    }
View Full Code Here

        super(name);
    }

    @Override
    public void run() throws Exception {
        CountDownLatchService service = getService();
        count = service.getCount(name);
    }
View Full Code Here

        super(name);
        this.count = count;
    }

    public void run() throws Exception {
        CountDownLatchService service = getService();
        service.setCountDirect(name, count);
    }
View Full Code Here

    }

    @Override
    public void run() throws Exception {
        if (data != null) {
            CountDownLatchService service = getService();
            for (CountDownLatchInfo latchInfo : data) {
                service.add(latchInfo);
            }
        }
    }
View Full Code Here

        return waitNotifyKey();
    }

    @Override
    public boolean shouldWait() {
        CountDownLatchService service = getService();
        return service.shouldWait(name);
    }
View Full Code Here

        super(name);
        this.count = count;
    }

    public void run() throws Exception {
        CountDownLatchService service = getService();
        response = service.setCount(name, count);
    }
View Full Code Here

                registerService(ListService.SERVICE_NAME, new ListService(nodeEngine));
                registerService(SetService.SERVICE_NAME, new SetService(nodeEngine));
                registerService(DistributedExecutorService.SERVICE_NAME, new DistributedExecutorService());
                registerService(AtomicLongService.SERVICE_NAME, new AtomicLongService());
                registerService(AtomicReferenceService.SERVICE_NAME, new AtomicReferenceService());
                registerService(CountDownLatchService.SERVICE_NAME, new CountDownLatchService());
                registerService(SemaphoreService.SERVICE_NAME, new SemaphoreService(nodeEngine));
                registerService(IdGeneratorService.SERVICE_NAME, new IdGeneratorService(nodeEngine));
                registerService(MapReduceService.SERVICE_NAME, new MapReduceService(nodeEngine));
            }
View Full Code Here

        registerService(ListService.SERVICE_NAME, new ListService(nodeEngine));
        registerService(SetService.SERVICE_NAME, new SetService(nodeEngine));
        registerService(DistributedExecutorService.SERVICE_NAME, new DistributedExecutorService());
        registerService(AtomicLongService.SERVICE_NAME, new AtomicLongService());
        registerService(AtomicReferenceService.SERVICE_NAME, new AtomicReferenceService());
        registerService(CountDownLatchService.SERVICE_NAME, new CountDownLatchService());
        registerService(SemaphoreService.SERVICE_NAME, new SemaphoreService(nodeEngine));
        registerService(IdGeneratorService.SERVICE_NAME, new IdGeneratorService(nodeEngine));
        registerService(MapReduceService.SERVICE_NAME, new MapReduceService(nodeEngine));
        registerService(ReplicatedMapService.SERVICE_NAME, new ReplicatedMapService(nodeEngine));
    }
View Full Code Here

        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()));
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.concurrent.countdownlatch.CountDownLatchService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.