Class FileAsync
java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.h2.store.fs.FileBase
org.h2.store.fs.FileBaseDefault
org.h2.store.fs.async.FileAsync
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, SeekableByteChannel, WritableByteChannel
File which uses NIO2 AsynchronousFileChannel.
-
Nested Class Summary
Nested classes/interfaces inherited from class FileChannel
FileChannel.MapMode -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static <T> Tvoidforce(boolean metaData) voidprotected voidimplTruncate(long newLength) The truncate implementation.intread(ByteBuffer dst, long position) longsize()toString()tryLock(long position, long size, boolean shared) intwrite(ByteBuffer src, long position) Methods inherited from class FileBase
lock, map, read, transferFrom, transferTo, writeMethods inherited from class AbstractInterruptibleChannel
begin, close, end, isOpen
-
Field Details
-
name
-
channel
-
-
Constructor Details
-
FileAsync
FileAsync(String fileName, String mode) throws IOException - Throws:
IOException
-
-
Method Details
-
complete
- Throws:
IOException
-
implCloseChannel
- Overrides:
implCloseChannelin classFileBase- Throws:
IOException
-
size
- Specified by:
sizein interfaceSeekableByteChannel- Specified by:
sizein classFileChannel- Throws:
IOException
-
read
- Overrides:
readin classFileBase- Throws:
IOException
-
write
- Overrides:
writein classFileBase- Throws:
IOException
-
implTruncate
Description copied from class:FileBaseDefaultThe truncate implementation.- Specified by:
implTruncatein classFileBaseDefault- Parameters:
newLength- the new size- Throws:
IOException- on failure
-
force
- Overrides:
forcein classFileBase- Throws:
IOException
-
tryLock
- Overrides:
tryLockin classFileBase- Throws:
IOException
-
toString
-