Class TempFileReaper
- java.lang.Object
-
- com.levigo.jadice.server.core.util.housekeeping.AbstractReaper<File>
-
- com.levigo.jadice.server.core.util.housekeeping.TempFileReaper
-
- All Implemented Interfaces:
SelfRegistering
,Runnable
,org.springframework.beans.factory.DisposableBean
,org.springframework.beans.factory.InitializingBean
,org.springframework.jmx.export.naming.SelfNaming
@ManagedResource("Reaper for TempFiles") public class TempFileReaper extends AbstractReaper<File>
The TempFileReaper is responsible for the removal of temporary files left over by a job. Nodes are encouraged to attempt to put all temp files into the directory returned byServerJob.getTempDir()
. This directory will automatically be removed after the job completes, even if some of the files remain locked for some time after the job has ended.
-
-
Constructor Summary
Constructors Constructor Description TempFileReaper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.jadice.util.log.Logger
getLogger()
protected String
getName()
protected void
reapAllObjectsOnShutdown()
protected boolean
reapObject(File file, int attempt)
-
Methods inherited from class com.levigo.jadice.server.core.util.housekeeping.AbstractReaper
afterPropertiesSet, destroy, enqueue, enqueue, getEnqueuedObjectCount, getEnqueuedObjects, getObjectName, getReapedObjectCount, getTimeInterval, run, setTimeInterval
-
-
-
-
Method Detail
-
reapObject
protected boolean reapObject(File file, int attempt)
- Specified by:
reapObject
in classAbstractReaper<File>
-
reapAllObjectsOnShutdown
protected void reapAllObjectsOnShutdown()
- Specified by:
reapAllObjectsOnShutdown
in classAbstractReaper<File>
-
getName
protected String getName()
- Specified by:
getName
in classAbstractReaper<File>
-
getLogger
protected org.jadice.util.log.Logger getLogger()
- Specified by:
getLogger
in classAbstractReaper<File>
-
-