public class AbstractCompositeTerminable extends Object implements CompositeTerminable
EMPTY| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCompositeTerminable() |
| Modifier and Type | Method and Description |
|---|---|
void |
cleanup()
Removes instances which have already been terminated.
|
void |
close()
Closes this composite terminable.
|
CompositeTerminable |
with(AutoCloseable autoCloseable)
Binds an
AutoCloseable with this composite closable. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbind, closeAndReportException, closeSilently, create, createWeak, withAll, withAllbindWith, isClosedbindModulepublic CompositeTerminable with(AutoCloseable autoCloseable)
CompositeTerminableAutoCloseable with this composite closable.
Note that implementations do not keep track of duplicate contained
terminables. If a single AutoCloseable is added twice, it will be
closed twice.
with in interface CompositeTerminableautoCloseable - the closable to bindpublic void close()
throws CompositeClosingException
CompositeTerminableclose in interface AutoCloseableclose in interface CompositeTerminableclose in interface TerminableCompositeClosingException - if any of the sub-terminables throw an
exception on closepublic void cleanup()
CompositeTerminablecleanup in interface CompositeTerminableCopyright © 2022. All rights reserved.