Class FS.LockToken

java.lang.Object
org.eclipse.jgit.util.FS.LockToken
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
FS

public static class FS.LockToken extends Object implements Closeable
A token representing a file created by FS.createNewFileAtomic(File). The token must be retained until the file has been deleted in order to guarantee that the unique file was created atomically. As soon as the file is no longer needed the lock token must be closed.
Since:
4.7
  • Field Details

    • isCreated

      private boolean isCreated
  • Constructor Details

    • LockToken

      LockToken(boolean isCreated, Optional<Path> link)
  • Method Details

    • isCreated

      public boolean isCreated()
      Returns:
      true if the file was created successfully
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • toString

      public String toString()
      Overrides:
      toString in class Object