Class PathStrategy

    • Method Detail

      • createTempFile

        public Path createTempFile()
        Creates a temporary file in a location suitable for efficient move to the final path for any key.
        Returns:
        the temporary file
      • getPathForKey

        public abstract Path getPathForKey​(String key)
        Gets the storage path for a given key.
        Parameters:
        key - the key
        Returns:
        the file for this key
      • atomicMove

        public static void atomicMove​(Path source,
                                      Path dest)
                               throws IOException
        Does an atomic move from source to dest.
        Parameters:
        source - the source
        dest - the destination
        Throws:
        IOException