public class DeferredDeletablesManager extends java.lang.Object implements Finalizable
Modifier and Type | Field and Description |
---|---|
private java.util.Set<DeferredDeletable> |
deletables
The core collection of resources which are to be deleted when the manager is finished
|
Constructor and Description |
---|
DeferredDeletablesManager() |
Modifier and Type | Method and Description |
---|---|
void |
deleted()
The method is a no-op due to the fact that the delete defer is made only when the
the manager is notified through the
finished method. |
void |
finished()
Does the effective delete of the registered resources when this manager is finished.
|
void |
iterate()
The method is a no-op due to the fact that the delete defer is made only when the
the manager is notified through the
finished method. |
boolean |
register(DeferredDeletable deletable)
Registers a specific deletable to this manager.
|
static boolean |
registerAt(int blockDepth,
DeferredDeletable resource)
Registers a resource at a specific block depth.
|
void |
retry()
The method is a no-op due to the fact that the delete defer is made only when the
the manager is notified through the
finished method. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
entry, initFailure, weight
private final java.util.Set<DeferredDeletable> deletables
public static boolean registerAt(int blockDepth, DeferredDeletable resource)
blockDepth
- The index of the outermost block at which a manager should be registered; blockDepth 0
means the global scope.resource
- The resource which is to be registered.false
if the registration was skipped as this resource was already registered,
true
otherwise.public boolean register(DeferredDeletable deletable)
deletable
- A resource meant to be registered for deletion.true
if the register was successful or false
if the
deletable was already registered in this manager.public void finished()
finished
in interface Finalizable
public void deleted()
finished
method.deleted
in interface Finalizable
public void iterate()
finished
method.iterate
in interface Finalizable
public void retry()
finished
method.retry
in interface Finalizable