|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BinaryGarbageCollector
A Garbage Collector for a BinaryManager
.
First, inform the GC that it is started by calling start()
.
Then for all binaries to mark, call mark(java.lang.String)
.
Finally when all binaries have been marked, callstop(boolean)
to delete the
non-marked binaries.
After this, getStatus()
returns information about the binaries
remaining and those that have been GCed.
Method Summary | |
---|---|
String |
getId()
Gets a unique identifier for this garbage collector. |
BinaryManagerStatus |
getStatus()
Gets the status of the binaries to GC and of those that won't be. |
boolean |
isInProgress()
Checks if a GC is in progress. |
void |
mark(String digest)
Marks a binary as being in use. |
void |
start()
Starts the garbage collection process. |
void |
stop(boolean delete)
Stops the garbage collection process and deletes all binaries that have not been marked (sweep). |
Method Detail |
---|
String getId()
void start()
After this, all active binaries must be fed to the mark(java.lang.String)
method.
void mark(String digest)
digest
- the binary's digestvoid stop(boolean delete)
delete
- true
if actual deletion must be performed,
false
if the binaries to delete should simply be
counted in the statusBinaryManagerStatus getStatus()
Available after stop(boolean)
.
boolean isInProgress()
A GC is in progress is #start
has been called but not
#stop
.
It's only useful to call this from a separate thread from the one that
calls mark(java.lang.String)
.
true
if a GC is in progress
|
Nuxeo ECM Projects 5.4.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |