public class AbstractAsyncFileChannel<F extends AbstractAsyncFileChannel<F>> extends AsynchronousFileChannel implements AsyncChannel
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractAsyncFileChannel(AsynchronousFileChannel delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected Promise<FileLock> |
doLock(long position,
long size,
boolean shared) |
void |
force(boolean metaData) |
boolean |
isOpen() |
Promise<FileLock> |
lock(boolean shared) |
<A> void |
lock(boolean shared,
A attachment,
CompletionHandler<FileLock,? super A> handler) |
Promise<FileLock> |
lock(long position,
long size,
boolean shared) |
<A> void |
lock(long position,
long size,
boolean shared,
A attachment,
CompletionHandler<FileLock,? super A> handler) |
Promise<Integer> |
read(ByteBuffer dst,
long position) |
<A> void |
read(ByteBuffer dst,
long position,
A attachment,
CompletionHandler<Integer,? super A> handler) |
long |
size() |
F |
truncate(long size) |
FileLock |
tryLock(boolean shared) |
FileLock |
tryLock(long position,
long size,
boolean shared) |
protected FileLock |
upgradeLock(FileLock delegate) |
Promise<Integer> |
write(ByteBuffer src,
long position) |
<A> void |
write(ByteBuffer src,
long position,
A attachment,
CompletionHandler<Integer,? super A> handler) |
protected AbstractAsyncFileChannel(AsynchronousFileChannel delegate)
public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface AsynchronousChannelclose in interface ChannelIOExceptionpublic long size()
throws IOException
size in class AsynchronousFileChannelIOExceptionpublic F truncate(long size) throws IOException
truncate in class AsynchronousFileChannelIOExceptionpublic void force(boolean metaData)
throws IOException
force in class AsynchronousFileChannelIOExceptionpublic Promise<FileLock> lock(long position, long size, boolean shared)
lock in class AsynchronousFileChannelpublic final <A> void lock(boolean shared,
A attachment,
CompletionHandler<FileLock,? super A> handler)
public <A> void lock(long position,
long size,
boolean shared,
A attachment,
CompletionHandler<FileLock,? super A> handler)
lock in class AsynchronousFileChannelpublic FileLock tryLock(boolean shared) throws IOException
IOExceptionpublic FileLock tryLock(long position, long size, boolean shared) throws IOException
tryLock in class AsynchronousFileChannelIOExceptionpublic <A> void read(ByteBuffer dst, long position, A attachment, CompletionHandler<Integer,? super A> handler)
read in class AsynchronousFileChannelpublic Promise<Integer> read(ByteBuffer dst, long position)
read in class AsynchronousFileChannelpublic <A> void write(ByteBuffer src, long position, A attachment, CompletionHandler<Integer,? super A> handler)
write in class AsynchronousFileChannelpublic Promise<Integer> write(ByteBuffer src, long position)
write in class AsynchronousFileChannelCopyright © 2021. All rights reserved.