Class FileSplit
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.split.FileSplit
- All Implemented Interfaces:
Closeable, AutoCloseable, ByteChannel, Channel, GatheringByteChannel, InterruptibleChannel, ReadableByteChannel, ScatteringByteChannel, SeekableByteChannel, WritableByteChannel
A file that may be split into multiple smaller files.
-
Nested Class Summary
Nested classes/interfaces inherited from class FileChannel
FileChannel.MapMode -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FilePathSplitprivate longprivate FileChannel[]private final longprivate final String -
Constructor Summary
ConstructorsConstructorDescriptionFileSplit(FilePathSplit file, String mode, FileChannel[] list, long length, long maxLength) -
Method Summary
Modifier and TypeMethodDescriptionvoidforce(boolean metaData) private FileChannelgetFileChannel(long position) 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
-
filePath
-
mode
-
maxLength
private final long maxLength -
list
-
length
private volatile long length
-
-
Constructor Details
-
FileSplit
FileSplit(FilePathSplit file, String mode, FileChannel[] list, long length, long maxLength)
-
-
Method Details
-
implCloseChannel
- Overrides:
implCloseChannelin classFileBase- Throws:
IOException
-
size
public long size()- Specified by:
sizein interfaceSeekableByteChannel- Specified by:
sizein classFileChannel
-
read
- Overrides:
readin classFileBase- Throws:
IOException
-
getFileChannel
- 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
-
write
- Overrides:
writein classFileBase- Throws:
IOException
-
tryLock
- Overrides:
tryLockin classFileBase- Throws:
IOException
-
toString
-