Note that since the implementation leaks the methods of AtomicReferenceArray, one must be careful to only call setResource, replaceResource and dispose on it. All other methods may lead to undefined behavior and should be used by internal means only.
| Modifier and Type | Field and Description |
|---|---|
| private static final long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| public Subscription | Returns: the old resource, can be nullthe index of the resource to replace index, Subscription the new resource resource)Replaces the resource at the specified index and returns the old resource. |
| public boolean | Returns: true if the resource has ben set, false if the composite has been disposedthe index of the resource to set index, Subscription the new resource resource)Sets the resource at the specified index and disposes the old resource. |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| ArrayCompositeSubscription | back to summary |
|---|---|
| public ArrayCompositeSubscription(int capacity) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| replaceResource | back to summary |
|---|---|
| public Subscription replaceResource(int index, Subscription resource) Replaces the resource at the specified index and returns the old resource.
| |
| setResource | back to summary |
|---|---|
| public boolean setResource(int index, Subscription resource) Sets the resource at the specified index and disposes the old resource.
| |