Package org.mycore.mcr.cronjob
Class MCRCronjobManager
java.lang.Object
org.mycore.mcr.cronjob.MCRCronjobManager
- All Implemented Interfaces:
Comparable<MCRShutdownHandler.Closeable>
,MCRShutdownHandler.Closeable
Schedules all Cronjobs defined with the property prefix
JOBS_CONFIG_PREFIX
. Couples the execution with the
MCRProcessableRegistry
.-
Field Summary
Fields inherited from interface org.mycore.common.events.MCRShutdownHandler.Closeable
DEFAULT_PRIORITY
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
cleanly closes this object that implementsCloseable
.static MCRCronjobManager
<T extends MCRCronjob>
Tvoid
prepare for closing this object that implementsCloseable
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.mycore.common.events.MCRShutdownHandler.Closeable
compareTo, getPriority
-
Field Details
-
JOBS_CONFIG_PREFIX
- See Also:
-
LOGGER
-
-
Method Details
-
getInstance
-
prepareClose
public void prepareClose()Description copied from interface:MCRShutdownHandler.Closeable
prepare for closing this object that implementsCloseable
. This is the first part of the closing process. As a object may need database access to close cleanly this method can be used to be ahead of database outtake.- Specified by:
prepareClose
in interfaceMCRShutdownHandler.Closeable
-
close
public void close()Description copied from interface:MCRShutdownHandler.Closeable
cleanly closes this object that implementsCloseable
. You can provide some functionality to close open files and sockets or so.- Specified by:
close
in interfaceMCRShutdownHandler.Closeable
-
getJob
-