910911912913914915916917918919920
} } @Override public void handleResultComplete() { synchronized(failureResult) { status.compareAndSet(0, 1); failureResult.notify(); } } @Override public void handleFailed(ModelNode failureDescription) {
918919920921922923924925926927928
} @Override public void handleFailed(ModelNode failureDescription) { synchronized(failureResult) { failureResult.set(failureDescription); status.compareAndSet(0, 2); failureResult.notify(); } } @Override public void handleCancellation() {
925926927928929930931932933934935
} } @Override public void handleCancellation() { synchronized(failureResult) { status.compareAndSet(0, 3); failureResult.notify(); } } }; final OperationResult result = BasicModelController.this.execute(resolveContext, resolveHandler, operationExecutionContext, false);
597598599600601602603604605606607
} } @Override public void handleResultComplete() { synchronized(failureResult) { status.compareAndSet(0, 1); if(count.decrementAndGet() == 0) { handleComplete(); } } }
609610611612613614615616617618619
public void handleFailed(ModelNode failureDescription) { synchronized(failureResult) { if(failureDescription != null) { failureResult.add(failureDescription); } status.compareAndSet(0, 2); if(count.decrementAndGet() == 0) { handleComplete(); } } }
618619620621622623624625626627628
} } @Override public void handleCancellation() { synchronized(failureResult) { status.compareAndSet(0, 3); if(count.decrementAndGet() == 0) { handleComplete(); } } }
5657585960616263646566
} @Override public void handleResultComplete() { synchronized (finalResult) { status.compareAndSet(0, 1); finalResult.notify(); } } @Override
6465666768697071727374
} @Override public void handleFailed(final ModelNode failureDescription) { synchronized (finalResult) { if (status.compareAndSet(0, 3)) { if (failureDescription != null && failureDescription.isDefined()) { finalResult.get(FAILURE_DESCRIPTION).set(failureDescription); } } finalResult.notify();
7677787980818283848586
} @Override public void handleCancellation() { synchronized (finalResult) { if (status.compareAndSet(0, 2)) { finalResult.remove(RESULT); } finalResult.notify(); } }
229230231232233234235236237238239
} @Override public void handleResultComplete() { clearAsynchronousOperation(asynchronousRequestId); if(!status.compareAndSet(0, 1)) { throw new RuntimeException("Result already set"); } completeLatch.countDown(); }