Examples of safelyDo()


Examples of orestes.bloomfilter.redis.helper.RedisPool.safelyDo()

        int perThread = rounds / connections;
        CompletableFuture[] futures = new CompletableFuture[connections];
        Long start = System.currentTimeMillis();
        for (int i = 0; i < connections; i++) {
            futures[i] = CompletableFuture.runAsync(() -> {
                pool.safelyDo(jedis -> {
                    for(int j = 0; j < perThread; j++) {
                        jedis.set("key" + Math.random(), RandomStringUtils.random(50));
                    }
                });
            }, exec);
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.