Package org.voltcore.utils.CoreUtils

Examples of org.voltcore.utils.CoreUtils.RetryException


                if (count > 5) {
                    sem.release();
                    return null;
                }
                System.out.println(count);
                throw new RetryException();
            }
        };
        CoreUtils.retryHelper(stpe, es, c, 0, 1, TimeUnit.MILLISECONDS, 10, TimeUnit.MILLISECONDS);
        sem.acquire();
        stpe.shutdown();
View Full Code Here


        ExecutorService es = Executors.newFixedThreadPool(1);
        final AtomicInteger count = new AtomicInteger();
        Callable<Object> c = new Callable<Object>() {
            public Object call() throws Exception {
                count.incrementAndGet();
                throw new RetryException();
            }
        };

        // attempt 5 times
        try {
View Full Code Here

TOP

Related Classes of org.voltcore.utils.CoreUtils.RetryException

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.