Class AbstractScheduledService.CustomScheduler.SupplantableFuture
java.lang.Object
com.google.common.util.concurrent.AbstractScheduledService.CustomScheduler.SupplantableFuture
- All Implemented Interfaces:
AbstractScheduledService.Cancellable
- Enclosing class:
AbstractScheduledService.CustomScheduler
private static final class AbstractScheduledService.CustomScheduler.SupplantableFuture
extends Object
implements AbstractScheduledService.Cancellable
Contains the most recently submitted
Future
, which may be cancelled or updated,
always under a lock.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
lock
-
currentFuture
-
-
Constructor Details
-
SupplantableFuture
SupplantableFuture(ReentrantLock lock, Future<Void> currentFuture)
-
-
Method Details
-
cancel
public void cancel(boolean mayInterruptIfRunning) - Specified by:
cancel
in interfaceAbstractScheduledService.Cancellable
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelled
in interfaceAbstractScheduledService.Cancellable
-