软件包 | 描述 |
---|---|
java.nio.channels |
定义了渠道,它代表的是能够执行I/O操作的实体连接,如文件和套接字;定义选择器,多路复用,非阻塞I/O操作。
|
Modifier and Type | Method and Description |
---|---|
FileLock |
FileChannel.lock()
获取此通道文件上的互斥锁。
|
abstract FileLock |
FileChannel.lock(long position, long size, boolean shared)
获取此通道文件的指定区域上的锁。
|
FileLock |
AsynchronousFileChannel.tryLock()
试图在这个通道的文件上获得独占锁。
|
FileLock |
FileChannel.tryLock()
试图在这个通道的文件上获得独占锁。
|
abstract FileLock |
AsynchronousFileChannel.tryLock(long position, long size, boolean shared)
试图获取此通道文件的指定区域上的锁的尝试。
|
abstract FileLock |
FileChannel.tryLock(long position, long size, boolean shared)
试图获取此通道文件的指定区域上的锁的尝试。
|
Modifier and Type | Method and Description |
---|---|
Future<FileLock> |
AsynchronousFileChannel.lock()
获取此通道文件上的互斥锁。
|
abstract Future<FileLock> |
AsynchronousFileChannel.lock(long position, long size, boolean shared)
获取此通道文件的指定区域上的锁。
|
Modifier and Type | Method and Description |
---|---|
<A> void |
AsynchronousFileChannel.lock(A attachment, CompletionHandler<FileLock,? super A> handler)
获取此通道文件上的互斥锁。
|
abstract <A> void |
AsynchronousFileChannel.lock(long position, long size, boolean shared, A attachment, CompletionHandler<FileLock,? super A> handler)
获取此通道文件的指定区域上的锁。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.