Package org.eclipse.jgit.util
Class FS.LockToken
- java.lang.Object
-
- org.eclipse.jgit.util.FS.LockToken
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
- Enclosing class:
- FS
public static class FS.LockToken extends java.lang.Object implements java.io.CloseableA token representing a file created byFS.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
-
-
Constructor Summary
Constructors Constructor Description LockToken(boolean isCreated, java.util.Optional<java.nio.file.Path> link)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisCreated()java.lang.StringtoString()
-
-
-
Method Detail
-
isCreated
public boolean isCreated()
- Returns:
trueif the file was created successfully
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-