Interface DisposableStreamerCancellation
- All Superinterfaces:
Disposable, StreamerCancellation
- All Known Implementing Classes:
CompositeDisposable
Represents the full, disposable cancellation interface for
Streamer
operations.
It was decided to have a separate set of interfaces instead of trying to
retrofit DisposableContainer.
- Since:
- 4.0.0
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionnever()Returns a constant instance which does nothing, cannot be disposed and accepts any incoming Disposable without registering it or handling it in any form, because thisneverinstance cannot be disposed to begin with.Methods inherited from interface Disposable
asAutoCloseable, dispose, isDisposedModifier and TypeMethodDescriptiondefault @NonNull AutoCloseableWraps thisDisposableinto anAutoCloseableinstance that can be used with try-with-resources constructs.voiddispose()Dispose the resource, the operation should be idempotent.booleanReturns true if this resource has been disposed.Methods inherited from interface StreamerCancellation
add, delete, derive, isDisposed, removeModifier and TypeMethodDescriptionbooleanAdds a disposable to this container or disposes it if the container has been disposed.booleanRemoves but does not dispose the given disposable if it is part of this container.derive()Create a derived sub-cancellation management interface that can get disposed by this cancellation management object but disposing the sub-cancellation manager does not dispose this currentStreamerCancellationinstance..booleanReturns true if this resource has been disposed.booleanRemoves and disposes the given disposable if it is part of this container.
-
Method Details
-
never
Returns a constant instance which does nothing, cannot be disposed and accepts any incoming Disposable without registering it or handling it in any form, because thisneverinstance cannot be disposed to begin with.- Returns:
- the shared constant no-op instance
-