Package com.hazelcast.util.FutureUtil

Examples of com.hazelcast.util.FutureUtil.ExceptionHandler


        List<Future> futures = new ArrayList<Future>();
        for (int i = 0; i < 2; i++) {
            futures.add(executorService.submit(new TimeoutingTask(waitLock)));
        }

        returnWithDeadline(futures, 1, TimeUnit.SECONDS, new ExceptionHandler() {
            @Override
            public void handleException(Throwable throwable) {
                if (throwable instanceof TimeoutException) {
                    ExceptionUtil.sneakyThrow(throwable);
                }
View Full Code Here


    }


    @Test(expected = TransactionTimedOutException.class)
    public void testTransactionTimedOutExceptionHandler() throws Exception {
        final ExceptionHandler exceptionHandler = FutureUtil.RETHROW_TRANSACTION_EXCEPTION;
        final Throwable throwable = new TimeoutException();

        exceptionHandler.handleException(throwable);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.util.FutureUtil.ExceptionHandler

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.