edu.emory.mathcs.util.gc
Class FinalizationGroup
java.lang.Object
edu.emory.mathcs.util.gc.FinalizationGroup
- public class FinalizationGroup
- extends java.lang.Object
Allows grouping together finalizers of similar object types, so that
they could e.g. be forcibly and collectively finalized upon VM exit.
- Version:
- 1.0
- Author:
- Dawid Kurzyniec
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
disable
public void disable()
registerFinalizer
public FinalizationFuture registerFinalizer(java.lang.Object referrent,
Finalizer finalizer)
registerFinalizer
public FinalizationFuture registerFinalizer(java.lang.Object referrent,
Finalizer finalizer,
boolean phantom)
addCompletionCallback
public boolean addCompletionCallback(Callback cb)
areAllDone
public boolean areAllDone()
awaitAllDone
public void awaitAllDone()
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
awaitAllDone
public void awaitAllDone(long timeout,
TimeUnit unit)
throws java.lang.InterruptedException,
TimeoutException
- Throws:
java.lang.InterruptedException
TimeoutException
finalizeAll
public boolean finalizeAll()
cancelAll
public boolean cancelAll(boolean mayInterruptIfRunning)