Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EJBCLIENT-537] EJBClientInvocationContext: make the class compile on… #720

Merged
merged 1 commit into from
Jul 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public final class EJBClientInvocationContext extends AbstractInvocationContext

private volatile boolean cancelRequested;
private boolean retryRequested;
private State state = State.SENDING;
private EJBClientInvocationContext.State state = EJBClientInvocationContext.State.SENDING;
private int remainingRetries;
private Supplier<? extends Throwable> pendingFailure;
private List<Supplier<? extends Throwable>> suppressedExceptions;
Expand Down Expand Up @@ -1082,7 +1082,7 @@ void retryOperation() {
} catch (Throwable t) {
final boolean retry;
synchronized (lock) {
retry = state == State.SENDING;
retry = state == EJBClientInvocationContext.State.SENDING;
}
if (retry) sendRequestInitial();
}
Expand All @@ -1097,7 +1097,7 @@ public boolean cancel(final boolean mayInterruptIfRunning) {
final Object lock = EJBClientInvocationContext.this.lock;
assert !holdsLock(lock);
synchronized (lock) {
if (state == State.DONE) {
if (state == EJBClientInvocationContext.State.DONE) {
// cannot cancel now; also resultProducer is gone
return pendingFailure == CANCELLED_PRODUCER;
} else if (! state.isWaiting()) {
Expand All @@ -1116,7 +1116,7 @@ public boolean cancel(final boolean mayInterruptIfRunning) {
final boolean result = receiver != null && receiver.cancelInvocation(receiverInvocationContext, mayInterruptIfRunning);
if (! result) {
synchronized (lock) {
if (resultProducer == CANCELLED || state == State.DONE && pendingFailure == CANCELLED_PRODUCER) {
if (resultProducer == CANCELLED || state == EJBClientInvocationContext.State.DONE && pendingFailure == CANCELLED_PRODUCER) {
return true;
}
}
Expand All @@ -1128,15 +1128,15 @@ public boolean isCancelled() {
final Object lock = EJBClientInvocationContext.this.lock;
assert !holdsLock(lock);
synchronized (lock) {
return state == State.DONE ? pendingFailure == CANCELLED_PRODUCER : resultProducer == CANCELLED;
return state == EJBClientInvocationContext.State.DONE ? pendingFailure == CANCELLED_PRODUCER : resultProducer == CANCELLED;
}
}

public boolean isDone() {
final Object lock = EJBClientInvocationContext.this.lock;
assert !holdsLock(lock);
synchronized (lock) {
if (state == State.CONSUMING) {
if (state == EJBClientInvocationContext.State.CONSUMING) {
return retryRequested && remainingRetries > 0 && resultProducer instanceof ThrowableResult;
} else {
// TODO: we should also calculate whether the invocation timed out
Expand Down
Loading