Package org.eclipse.xtext.util
Class BufferedCancelIndicator
- java.lang.Object
-
- org.eclipse.xtext.util.BufferedCancelIndicator
-
- All Implemented Interfaces:
CancelIndicator
public class BufferedCancelIndicator extends java.lang.Object implements CancelIndicator
A cancel indicator that will not cancel immediately but only after a delay to allow short running tasks to complete despite an attempt to cancel.
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.util.CancelIndicator
NullImpl
-
-
Constructor Summary
Constructors Constructor Description BufferedCancelIndicator(CancelIndicator delegate)Buffer the cancellation attempts that are issued by the given delegate.BufferedCancelIndicator(CancelIndicator delegate, com.google.common.base.Ticker clock, long delayInNanos)Buffer the cancellation attempts that are issued by the given delegate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisCanceled()
-
-
-
Constructor Detail
-
BufferedCancelIndicator
public BufferedCancelIndicator(CancelIndicator delegate)
Buffer the cancellation attempts that are issued by the given delegate.
-
BufferedCancelIndicator
public BufferedCancelIndicator(CancelIndicator delegate, com.google.common.base.Ticker clock, long delayInNanos)
Buffer the cancellation attempts that are issued by the given delegate. Use the given clock as the source for the time. This is public for testing purpose.
-
-
Method Detail
-
isCanceled
public boolean isCanceled()
- Specified by:
isCanceledin interfaceCancelIndicator
-
-