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 theStreamTask
for figuring out whether it has been cancelled.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static StreamTaskCancellationContext
alwaysRunning()
Factory for a context that always returnsfalse
whenisCancelled()
is called.boolean
isCancelled()
Find out whether theStreamTask
this context belongs to has been cancelled.
-
-
-
Method Detail
-
alwaysRunning
static StreamTaskCancellationContext alwaysRunning()
Factory for a context that always returnsfalse
whenisCancelled()
is called.- Returns:
- context
-
isCancelled
boolean isCancelled()
Find out whether theStreamTask
this context belongs to has been cancelled.- Returns:
- true if the
StreamTask
the has been cancelled
-
-