Class DefaultCheckpointers


  • public final class DefaultCheckpointers
    extends java.lang.Object
    Provides static factory methods used to create instances of default Checkpointer implementations.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Checkpointer file​(java.nio.file.Path path)
      Checkpointer implementation that persists state to a given file.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • file

        public static Checkpointer file​(java.nio.file.Path path)
                                 throws java.io.IOException
        Checkpointer implementation that persists state to a given file. If the file exists, it must contain valid persistent checkpoint state. If the file does not exist, the checkpointer will be created with default initial state, which will start listening from the current block.

        The checkpointer will attempt to obtain an exclusive lock on the file so there can only be a single checkpointer instance for a given file at any point in time.

        Parameters:
        path - A file path.
        Returns:
        A checkpointer.
        Throws:
        java.io.IOException - if an error occurs creating the checkpointer.