public class

FileLockImpl

extends FileLock
java.lang.Object
   ↳ java.nio.channels.FileLock
     ↳ sun.nio.ch.FileLockImpl

Summary

Public Methods
synchronized boolean isValid()
Tells whether or not this lock is valid.
synchronized void release()
Releases this lock.
[Expand]
Inherited Methods
From class java.nio.channels.FileLock
From class java.lang.Object

Public Methods

public synchronized boolean isValid ()

Tells whether or not this lock is valid.

A lock object remains valid until it is released or the associated file channel is closed, whichever comes first.

Returns
  • true if, and only if, this lock is valid

public synchronized void release ()

Releases this lock.

If this lock object is valid then invoking this method releases the lock and renders the object invalid. If this lock object is invalid then invoking this method has no effect.

Throws
IOException