@Override public void handleException(final Throwable throwable) { Throwable cause = throwable; if (throwable instanceof ExecutionException && throwable.getCause() != null) { cause = throwable.getCause(); } if (error == null) { error = cause; } log(cause); }
private void lockClusterStateOnAllMembers(ClusterStateChange stateChange, NodeEngineImpl nodeEngine, long leaseTime, String txnId, Collection<MemberImpl> members, int memberListVersion, int partitionStateVersion) { Collection<Future> futures = new ArrayList<Future>(members.size()); final Address thisAddress = node.getThisAddress(); for (Member member : members) { Operation op = new LockClusterStateOp(stateChange, thisAddress, txnId, leaseTime, memberListVersion, partitionStateVersion); Future future = nodeEngine.getOperationService().invokeOnTarget(SERVICE_NAME, op, member.getAddress()); futures.add(future); } StateManagerExceptionHandler exceptionHandler = new StateManagerExceptionHandler(logger); waitWithDeadline(futures, leaseTime, TimeUnit.MILLISECONDS, exceptionHandler); exceptionHandler.rethrowIfFailed(); }
private void lockClusterStateOnAllMembers(ClusterStateChange stateChange, NodeEngineImpl nodeEngine, long leaseTime, String txnId, Collection<MemberImpl> members, int memberListVersion, int partitionStateVersion) { Collection<Future> futures = new ArrayList<Future>(members.size()); final Address thisAddress = node.getThisAddress(); for (Member member : members) { Operation op = new LockClusterStateOp(stateChange, thisAddress, txnId, leaseTime, memberListVersion, partitionStateVersion); Future future = nodeEngine.getOperationService().invokeOnTarget(SERVICE_NAME, op, member.getAddress()); futures.add(future); } StateManagerExceptionHandler exceptionHandler = new StateManagerExceptionHandler(logger); waitWithDeadline(futures, leaseTime, TimeUnit.MILLISECONDS, exceptionHandler); exceptionHandler.rethrowIfFailed(); }
@Override public void handleException(final Throwable throwable) { Throwable cause = throwable; if (throwable instanceof ExecutionException && throwable.getCause() != null) { cause = throwable.getCause(); } if (error == null) { error = cause; } log(cause); }