Class TransientFile

java.lang.Object
org.opendaylight.raft.spi.TransientFile

@NonNullByDefault public final class TransientFile extends Object
A reference to a file which needs to be deleted once no longer in use. This object is an explicit reference to it, with GC-based safety net. Users are advised to delete() the file when it is no longer needed.
  • Constructor Details

    • TransientFile

      public TransientFile(Path path)
      Default constructor.
      Parameters:
      path - the path
  • Method Details

    • path

      public Path path()
      Returns the path of this file.
      Returns:
      the path of this file
    • delete

      public void delete()
      Delete this file.
    • toString

      public String toString()
      Overrides:
      toString in class Object