Class LockFile
- java.lang.Object
-
- com.google.cloud.tools.jib.filesystem.LockFile
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class LockFile extends java.lang.Object implements java.io.Closeable
Creates and deletes lock files.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Releases the lock file.static LockFile
lock(java.nio.file.Path lockFile)
Creates a lock file.
-
-
-
Method Detail
-
lock
public static LockFile lock(java.nio.file.Path lockFile) throws java.io.IOException
Creates a lock file.- Parameters:
lockFile
- the path of the lock file- Returns:
- a new
LockFile
that can be released later - Throws:
java.io.IOException
- if creating the lock file fails
-
close
public void close()
Releases the lock file.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
-
-