Package com.netflix.curator.framework.recipes.atomic

Examples of com.netflix.curator.framework.recipes.atomic.DistributedAtomicLong.increment()


    public long nextUid(MailboxSession session, Mailbox mailbox) throws MailboxException {
        if (client.isStarted()) {
            DistributedAtomicLong uid = new DistributedAtomicLong(client, pathForMailbox(mailbox), retryPolicy);
            AtomicValue<Long> value = null;
            try {
                uid.increment();
                value = uid.get();
            } catch (Exception e) {
                throw new MailboxException("Exception incrementing UID for session " + session, e);
            } finally {
                if (value != null && value.succeeded()) {
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.