Package org.mycore.common.events
Interface MCRShutdownHandler.Closeable
- All Superinterfaces:
Comparable<MCRShutdownHandler.Closeable>
- All Known Implementing Classes:
MCRCronjobManager
,MCRDOMUtils
,MCRFileUploadBucket
,MCRImageTiler
,MCRJMXBridge
,MCRJobMaster
,MCRJobQueue
,MCRTilingQueue
,MCRURNGranularRESTRegistrationStarter
- Enclosing class:
- MCRShutdownHandler
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public static interface MCRShutdownHandler.Closeable
extends Comparable<MCRShutdownHandler.Closeable>
Object is cleanly closeable via
close()
-call.- Author:
- Thomas Scheffler (yagee)
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
cleanly closes this object that implementsCloseable
.default int
default int
Returns the priority.default void
prepare for closing this object that implementsCloseable
.
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITYThe default priority- See Also:
-
-
Method Details
-
prepareClose
default void prepareClose()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. -
close
void close()cleanly closes this object that implementsCloseable
. You can provide some functionality to close open files and sockets or so. -
getPriority
default int getPriority()Returns the priority. A Closeable with a higher priority will be closed before a Closeable with a lower priority. Default priority is 5. -
compareTo
- Specified by:
compareTo
in interfaceComparable<MCRShutdownHandler.Closeable>
-