public class ManagedClientRequestImpl extends Object implements ClientRequest
| Modifier and Type | Class and Description |
|---|---|
protected static class |
ManagedClientRequestImpl.AwaitResponseState |
protected static class |
ManagedClientRequestImpl.ClosedState |
protected static class |
ManagedClientRequestImpl.ResolvedState
Entered when the request is resolved successfully, has finally failed, etc.
|
protected static class |
ManagedClientRequestImpl.StateMachineContext |
protected static class |
ManagedClientRequestImpl.SubmitRequestState |
| Modifier and Type | Field and Description |
|---|---|
protected static ManagedClientRequestImpl.AwaitResponseState |
AWAIT_RESPONSE_STATE |
protected static ManagedClientRequestImpl.ClosedState |
CLOSED_STATE |
protected long |
deadline |
protected RemoteAddress |
endpoint |
protected long |
id |
protected static ManagedClientRequestImpl.SubmitRequestState |
OPEN_REQUEST_STATE |
protected ClientRequestImpl |
request |
protected org.agrona.ExpandableArrayBuffer |
requestBuffer |
protected io.zeebe.util.buffer.DirectBufferWriter |
requestWriter |
protected static ManagedClientRequestImpl.ResolvedState |
RESOLVED_STATE |
protected FutureImpl |
responseFuture |
protected io.zeebe.util.state.StateMachineAgent<ManagedClientRequestImpl.StateMachineContext> |
stateMachine |
protected static int |
TRANSITION_CLOSE |
protected static int |
TRANSITION_DEFAULT |
protected static int |
TRANSITION_RESOLVE |
protected static int |
TRANSITION_RETRY |
| Constructor and Description |
|---|
ManagedClientRequestImpl(ClientRequestImpl request,
RemoteAddress endpoint,
io.zeebe.util.buffer.BufferWriter writer,
long timeout) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel(boolean mayInterruptIfRunning) |
void |
close() |
int |
doWork() |
org.agrona.DirectBuffer |
get() |
org.agrona.DirectBuffer |
get(long timeout,
TimeUnit unit) |
long |
getRequestId() |
boolean |
isCancelled() |
boolean |
isClosed() |
boolean |
isDone() |
boolean |
isFailed() |
protected boolean |
isTimedOut() |
org.agrona.DirectBuffer |
join()
Same as
Future.get(), but throws runtime exceptions |
protected final long deadline
protected final long id
protected final RemoteAddress endpoint
protected final FutureImpl responseFuture
protected final ClientRequestImpl request
protected org.agrona.ExpandableArrayBuffer requestBuffer
protected io.zeebe.util.buffer.DirectBufferWriter requestWriter
protected final io.zeebe.util.state.StateMachineAgent<ManagedClientRequestImpl.StateMachineContext> stateMachine
protected static final int TRANSITION_DEFAULT
protected static final int TRANSITION_RESOLVE
protected static final int TRANSITION_RETRY
protected static final int TRANSITION_CLOSE
protected static final ManagedClientRequestImpl.SubmitRequestState OPEN_REQUEST_STATE
protected static final ManagedClientRequestImpl.AwaitResponseState AWAIT_RESPONSE_STATE
protected static final ManagedClientRequestImpl.ResolvedState RESOLVED_STATE
protected static final ManagedClientRequestImpl.ClosedState CLOSED_STATE
public ManagedClientRequestImpl(ClientRequestImpl request, RemoteAddress endpoint, io.zeebe.util.buffer.BufferWriter writer, long timeout)
public boolean isClosed()
public void close()
close in interface ClientRequestclose in interface AutoCloseablepublic boolean cancel(boolean mayInterruptIfRunning)
public boolean isCancelled()
isCancelled in interface Future<org.agrona.DirectBuffer>public org.agrona.DirectBuffer get()
throws InterruptedException,
ExecutionException
get in interface Future<org.agrona.DirectBuffer>InterruptedExceptionExecutionExceptionpublic org.agrona.DirectBuffer get(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
get in interface Future<org.agrona.DirectBuffer>InterruptedExceptionExecutionExceptionTimeoutExceptionpublic long getRequestId()
getRequestId in interface ClientRequestpublic org.agrona.DirectBuffer join()
ClientRequestFuture.get(), but throws runtime exceptionsjoin in interface ClientRequestpublic boolean isFailed()
isFailed in interface ClientRequestpublic int doWork()
protected boolean isTimedOut()
Copyright © 2017–2018 camunda services GmbH. All rights reserved.