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 booleancontextIsDeadlineSourceprivate java.util.concurrent.ScheduledFuture<?>deadlineCancellationFutureprivate booleanhasDeadlineprivate longremainingNanosprivate booleantearDownCalled
-
Constructor Summary
Constructors Constructor Description CancellationHandler(Deadline deadline, boolean contextIsDeadlineSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelled(Context context)Notifies that a context was cancelled.(package private) StatusformatDeadlineExceededStatus()voidrun()(package private) voidsetUp()(package private) voidtearDown()
-
-
-
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.CancellationListenerNotifies that a context was cancelled.- Specified by:
cancelledin interfaceContext.CancellationListener- Parameters:
context- the newly cancelled context.
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
formatDeadlineExceededStatus
Status formatDeadlineExceededStatus()
-
-