Class GridFSBlobStore.GridFSBlobGarbageCollector
- java.lang.Object
-
- org.nuxeo.ecm.core.blob.AbstractBlobGarbageCollector
-
- org.nuxeo.ecm.core.storage.mongodb.blob.GridFSBlobStore.GridFSBlobGarbageCollector
-
- All Implemented Interfaces:
BinaryGarbageCollector
- Enclosing class:
- GridFSBlobStore
public class GridFSBlobStore.GridFSBlobGarbageCollector extends AbstractBlobGarbageCollector
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
GC_INSTANCE_KEY_PREFIX
protected static String
MARK_KEY_PREFIX
protected String
msKey
protected static int
WARN_OBJECTS_THRESHOLD
-
Fields inherited from class org.nuxeo.ecm.core.blob.AbstractBlobGarbageCollector
marked, startTime, status, toDelete
-
-
Constructor Summary
Constructors Constructor Description GridFSBlobGarbageCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
computeToDelete()
Computes keys candidate for deletion.String
getId()
Gets a unique identifier for this garbage collector.void
mark(String key)
Marks a binary as being in use.void
removeUnmarkedBlobsAndUpdateStatus(boolean delete)
-
Methods inherited from class org.nuxeo.ecm.core.blob.AbstractBlobGarbageCollector
getStatus, getUnmarkedBlobsAndUpdateStatus, isInProgress, removeBlobs, start, stop
-
-
-
-
Field Detail
-
WARN_OBJECTS_THRESHOLD
protected static final int WARN_OBJECTS_THRESHOLD
- See Also:
- Constant Field Values
-
MARK_KEY_PREFIX
protected static final String MARK_KEY_PREFIX
- See Also:
- Constant Field Values
-
GC_INSTANCE_KEY_PREFIX
protected static final String GC_INSTANCE_KEY_PREFIX
- See Also:
- Constant Field Values
-
msKey
protected String msKey
-
-
Method Detail
-
computeToDelete
public void computeToDelete()
Description copied from class:AbstractBlobGarbageCollector
Computes keys candidate for deletion.Overrides should not call super (this allows detecting old implementations).
- Overrides:
computeToDelete
in classAbstractBlobGarbageCollector
-
getId
public String getId()
Description copied from interface:BinaryGarbageCollector
Gets a unique identifier for this garbage collector. Two garbage collectors that would impact the same files must have the same identifier.- Returns:
- a unique identifier
-
mark
public void mark(String key)
Description copied from interface:BinaryGarbageCollector
Marks a binary as being in use.- Specified by:
mark
in interfaceBinaryGarbageCollector
- Overrides:
mark
in classAbstractBlobGarbageCollector
- Parameters:
key
- the binary's digest
-
removeUnmarkedBlobsAndUpdateStatus
public void removeUnmarkedBlobsAndUpdateStatus(boolean delete)
- Overrides:
removeUnmarkedBlobsAndUpdateStatus
in classAbstractBlobGarbageCollector
-
-