APIdia Launch Partner
Top Fields Constructors Methods
sun.nio.ch

public Class FileLockImpl

extends FileLock
Class Inheritance
Imports
java.io.IOException, java.nio.channels.*

Field Summary

Modifier and TypeField and Description
private volatile boolean

Constructor Summary

AccessConstructor and Description
pack-priv
FileLockImpl(FileChannel channel, long position, long size, boolean shared)

pack-priv
FileLockImpl(AsynchronousFileChannel channel, long position, long size, boolean shared)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public boolean
isValid()

Implements abstract java.nio.channels.FileLock.isValid.

Tells whether or not this lock is valid.

public synchronized void
release()

Implements abstract java.nio.channels.FileLock.release.

Releases this lock.

Inherited from java.nio.channels.FileLock:
acquiredBychannelcloseisSharedoverlapspositionsizetoString

Field Detail

invalidback to summary
private volatile boolean invalid

Constructor Detail

FileLockImplback to summary
pack-priv FileLockImpl(FileChannel channel, long position, long size, boolean shared)
FileLockImplback to summary
pack-priv FileLockImpl(AsynchronousFileChannel channel, long position, long size, boolean shared)

Method Detail

invalidateback to summary
pack-priv void invalidate()
isValidback to summary
public boolean isValid()

Implements abstract java.nio.channels.FileLock.isValid.

Doc from java.nio.channels.FileLock.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.

releaseback to summary
public synchronized void release() throws IOException

Implements abstract java.nio.channels.FileLock.release.

Doc from java.nio.channels.FileLock.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.

Exceptions
IOException:
If an I/O error occurs