public class DefaultDisposableManager extends java.lang.Object implements DisposableManager
DisposableManager
.Constructor and Description |
---|
DefaultDisposableManager()
Creates a new
DefaultDisposableManager . |
Modifier and Type | Method and Description |
---|---|
boolean |
bind(Disposable disposable)
Registers a disposable as being in use.
|
int |
getBoundDisposableCount()
Returns the number of Disposable objects pending to be released.
|
java.util.Set<DisposableInfo> |
getBoundDisposables()
Returns a
Set of Disposable objects currently bound. |
DisposableInfo |
getDisposableInfo(Disposable disposable) |
int |
getStackLimit() |
boolean |
release(Disposable disposable)
Marks a disposable as not being used anymore.
|
void |
releaseAll()
Releases all bound
Disposable s. |
void |
setStackLimit(int stackLimit) |
public DefaultDisposableManager()
DefaultDisposableManager
.public int getStackLimit()
getStackLimit
in interface DisposableManager
public void setStackLimit(int stackLimit)
setStackLimit
in interface DisposableManager
public boolean bind(Disposable disposable)
DisposableManager
bind
in interface DisposableManager
disposable
- to bindpublic boolean release(Disposable disposable)
DisposableManager
release
in interface DisposableManager
disposable
- to releasepublic void releaseAll() throws BaseException
DisposableManager
Disposable
s.releaseAll
in interface DisposableManager
BaseException
- if there is an error disposing any of the bound
disposablespublic int getBoundDisposableCount()
DisposableManager
getBoundDisposableCount
in interface DisposableManager
public java.util.Set<DisposableInfo> getBoundDisposables()
DisposableManager
Set
of Disposable
objects currently bound.getBoundDisposables
in interface DisposableManager
public DisposableInfo getDisposableInfo(Disposable disposable)
getDisposableInfo
in interface DisposableManager