Interface StreamTaskCancellationContext
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface @Internal public interface StreamTaskCancellationContext
Context on theStreamTaskfor figuring out whether it has been cancelled.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static StreamTaskCancellationContextalwaysRunning()Factory for a context that always returnsfalsewhenisCancelled()is called.booleanisCancelled()Find out whether theStreamTaskthis context belongs to has been cancelled.
-
-
-
Method Detail
-
alwaysRunning
static StreamTaskCancellationContext alwaysRunning()
Factory for a context that always returnsfalsewhenisCancelled()is called.- Returns:
- context
-
isCancelled
boolean isCancelled()
Find out whether theStreamTaskthis context belongs to has been cancelled.- Returns:
- true if the
StreamTaskthe has been cancelled
-
-