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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    The default priority
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    cleanly closes this object that implements Closeable.
    default int
     
    default int
    Returns the priority.
    default void
    prepare for closing this object that implements Closeable.
  • Field Details

    • DEFAULT_PRIORITY

      static final int DEFAULT_PRIORITY
      The default priority
      See Also:
  • Method Details

    • prepareClose

      default void prepareClose()
      prepare for closing this object that implements Closeable. 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 implements Closeable. 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

      default int compareTo(MCRShutdownHandler.Closeable other)
      Specified by:
      compareTo in interface Comparable<MCRShutdownHandler.Closeable>