public class SessionLock extends Object implements AutoCloseable
| Modifier and Type | Class and Description |
|---|---|
static class |
SessionLock.AlreadyLockedException |
| Modifier and Type | Field and Description |
|---|---|
private FileChannel |
channel |
private static ByteBuffer |
field_25353 |
private FileLock |
lock |
| Modifier | Constructor and Description |
|---|---|
private |
SessionLock(FileChannel channel,
FileLock lock) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static SessionLock |
create(Path path) |
static boolean |
isLocked(Path path) |
boolean |
isValid() |
private static final ByteBuffer field_25353
private final FileChannel channel
private final FileLock lock
private SessionLock(FileChannel channel, FileLock lock)
public static SessionLock create(Path path) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface AutoCloseableIOExceptionpublic boolean isValid()
@Environment(value=CLIENT) public static boolean isLocked(Path path) throws IOException
IOException