Package org.apache.curator.framework.recipes.atomic

Examples of org.apache.curator.framework.recipes.atomic.DistributedAtomicInteger.increment()


        } catch (Exception e) {
            throw new LumifyException("failed to initialize counter for " + userId);
        }

        try {
            AtomicValue<Integer> count = direction == Direction.INCREMENT ? distributedAtomicInteger.increment() : distributedAtomicInteger.decrement();
            if (count.succeeded()) {
                return count.postValue();
            } else {
                throw new LumifyException("failed to " + direction + " counter for " + userId);
            }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.