Package reactor.core
Interface Disposable
- All Known Subinterfaces:
Disposable.Composite,Disposable.Swap,Scheduler,Scheduler.Worker
- All Known Implementing Classes:
BaseSubscriber,DirectProcessor,EmitterProcessor,FluxProcessor,MonoProcessor,ReplayProcessor,Schedulers.Snapshot,UnicastProcessor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Indicates that a task or resource can be cancelled/disposed.
Call to the dispose method is/should be idempotent.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA container ofDisposablethat is itselfDisposable.static interfaceADisposablecontainer that allows updating/replacing its inner Disposable atomically and with respect of disposing the container itself. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Cancel or dispose the underlying task or resource.default booleanOptionally return true when the resource or task is disposed.
-
Method Details
-
dispose
void dispose()Cancel or dispose the underlying task or resource.Implementations are required to make this method idempotent.
-
isDisposed
default boolean isDisposed()Optionally return true when the resource or task is disposed.Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.
- Returns:
- true when there's a guarantee the resource or task is disposed.
-