Package net.spy.memcached

Examples of net.spy.memcached.MemcachedClient.incr()


            for (int i = 0; i < 100; i++) {
                final OperationFuture<Boolean> future = client.set(String.valueOf(i), 0, i);
                future.get();
            }
            for (int i = 0; i < 100; i++) {
                assertEquals(i * 2, client.incr(String.valueOf(i), i));
            }
            for (int i = 100; i < 120; i++) {
                assertEquals(-1, client.incr(String.valueOf(i), i));
            }
            for (int i = 0; i < 100; i++) {
View Full Code Here


            }
            for (int i = 0; i < 100; i++) {
                assertEquals(i * 2, client.incr(String.valueOf(i), i));
            }
            for (int i = 100; i < 120; i++) {
                assertEquals(-1, client.incr(String.valueOf(i), i));
            }
            for (int i = 0; i < 100; i++) {
                assertEquals(i, client.decr(String.valueOf(i), i));
            }
            for (int i = 100; i < 130; i++) {
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.