Package io.grpc.internal
Class ClientCallImpl.CancellationHandler
- java.lang.Object
-
- io.grpc.internal.ClientCallImpl.CancellationHandler
-
- All Implemented Interfaces:
Context.CancellationListener
,java.lang.Runnable
- Enclosing class:
- ClientCallImpl<ReqT,RespT>
private final class ClientCallImpl.CancellationHandler extends java.lang.Object implements java.lang.Runnable, Context.CancellationListener
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
contextIsDeadlineSource
private java.util.concurrent.ScheduledFuture<?>
deadlineCancellationFuture
private boolean
hasDeadline
private long
remainingNanos
private boolean
tearDownCalled
-
Constructor Summary
Constructors Constructor Description CancellationHandler(Deadline deadline, boolean contextIsDeadlineSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancelled(Context context)
Notifies that a context was cancelled.(package private) Status
formatDeadlineExceededStatus()
void
run()
(package private) void
setUp()
(package private) void
tearDown()
-
-
-
Field Detail
-
contextIsDeadlineSource
private final boolean contextIsDeadlineSource
-
hasDeadline
private final boolean hasDeadline
-
remainingNanos
private final long remainingNanos
-
deadlineCancellationFuture
private volatile java.util.concurrent.ScheduledFuture<?> deadlineCancellationFuture
-
tearDownCalled
private volatile boolean tearDownCalled
-
-
Constructor Detail
-
CancellationHandler
CancellationHandler(Deadline deadline, boolean contextIsDeadlineSource)
-
-
Method Detail
-
setUp
void setUp()
-
tearDown
void tearDown()
-
cancelled
public void cancelled(Context context)
Description copied from interface:Context.CancellationListener
Notifies that a context was cancelled.- Specified by:
cancelled
in interfaceContext.CancellationListener
- Parameters:
context
- the newly cancelled context.
-
run
public void run()
- Specified by:
run
in interfacejava.lang.Runnable
-
formatDeadlineExceededStatus
Status formatDeadlineExceededStatus()
-
-