Package io.grpc
Class SynchronizationContext.ScheduledHandle
- java.lang.Object
-
- io.grpc.SynchronizationContext.ScheduledHandle
-
- Enclosing class:
- SynchronizationContext
public static final class SynchronizationContext.ScheduledHandle extends Object
Allows the user to check the status and/or cancel a task scheduled bySynchronizationContext.schedule(java.lang.Runnable, long, java.util.concurrent.TimeUnit, java.util.concurrent.ScheduledExecutorService).This class is NOT thread-safe. All methods must be run from the same
SynchronizationContextas which the task was scheduled in.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancel()Cancel the task if it's stillpending.booleanisPending()Returnstrueif the task will eventually run, meaning that it has neither started running nor been cancelled.
-
-
-
Method Detail
-
cancel
public void cancel()
Cancel the task if it's stillpending.
-
isPending
public boolean isPending()
Returnstrueif the task will eventually run, meaning that it has neither started running nor been cancelled.
-
-