Package software.amazon.nio.spi.s3
Class AsyncS3FileChannel
- java.lang.Object
-
- java.nio.channels.AsynchronousFileChannel
-
- software.amazon.nio.spi.s3.AsyncS3FileChannel
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.AsynchronousChannel,java.nio.channels.Channel
public class AsyncS3FileChannel extends java.nio.channels.AsynchronousFileChannel
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidforce(boolean metaData)booleanisOpen()java.util.concurrent.Future<java.nio.channels.FileLock>lock(long position, long size, boolean shared)<A> voidlock(long position, long size, boolean shared, A attachment, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A> handler)java.util.concurrent.Future<java.lang.Integer>read(java.nio.ByteBuffer dst, long position)<A> voidread(java.nio.ByteBuffer dst, long position, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)longsize()java.nio.channels.AsynchronousFileChanneltruncate(long size)java.nio.channels.FileLocktryLock(long position, long size, boolean shared)java.util.concurrent.Future<java.lang.Integer>write(java.nio.ByteBuffer src, long position)<A> voidwrite(java.nio.ByteBuffer src, long position, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)
-
-
-
Method Detail
-
size
public long size() throws java.io.IOException- Specified by:
sizein classjava.nio.channels.AsynchronousFileChannel- Throws:
java.io.IOException
-
truncate
public java.nio.channels.AsynchronousFileChannel truncate(long size) throws java.io.IOException- Specified by:
truncatein classjava.nio.channels.AsynchronousFileChannel- Throws:
java.io.IOException
-
force
public void force(boolean metaData) throws java.io.IOException- Specified by:
forcein classjava.nio.channels.AsynchronousFileChannel- Throws:
java.io.IOException
-
lock
public <A> void lock(long position, long size, boolean shared, A attachment, java.nio.channels.CompletionHandler<java.nio.channels.FileLock,? super A> handler)- Specified by:
lockin classjava.nio.channels.AsynchronousFileChannel
-
lock
public java.util.concurrent.Future<java.nio.channels.FileLock> lock(long position, long size, boolean shared)- Specified by:
lockin classjava.nio.channels.AsynchronousFileChannel
-
tryLock
public java.nio.channels.FileLock tryLock(long position, long size, boolean shared) throws java.io.IOException- Specified by:
tryLockin classjava.nio.channels.AsynchronousFileChannel- Throws:
java.io.IOException
-
read
public <A> void read(java.nio.ByteBuffer dst, long position, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)- Specified by:
readin classjava.nio.channels.AsynchronousFileChannel
-
read
public java.util.concurrent.Future<java.lang.Integer> read(java.nio.ByteBuffer dst, long position)- Specified by:
readin classjava.nio.channels.AsynchronousFileChannel
-
write
public <A> void write(java.nio.ByteBuffer src, long position, A attachment, java.nio.channels.CompletionHandler<java.lang.Integer,? super A> handler)- Specified by:
writein classjava.nio.channels.AsynchronousFileChannel
-
write
public java.util.concurrent.Future<java.lang.Integer> write(java.nio.ByteBuffer src, long position)- Specified by:
writein classjava.nio.channels.AsynchronousFileChannel
-
isOpen
public boolean isOpen()
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
-