Class FilePathCache.FileCache
- java.lang.Object
-
- java.nio.channels.spi.AbstractInterruptibleChannel
-
- java.nio.channels.FileChannel
-
- org.dizitart.no2.mvstore.compat.v1.mvstore.fs.FileBase
-
- org.dizitart.no2.mvstore.compat.v1.mvstore.cache.FilePathCache.FileCache
-
- All Implemented Interfaces:
Closeable,AutoCloseable,ByteChannel,Channel,GatheringByteChannel,InterruptibleChannel,ReadableByteChannel,ScatteringByteChannel,SeekableByteChannel,WritableByteChannel
- Enclosing class:
- FilePathCache
public static class FilePathCache.FileCache extends FileBase
A file with a read cache.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class java.nio.channels.FileChannel
FileChannel.MapMode
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidforce(boolean metaData)longposition()FileChannelposition(long newPosition)intread(ByteBuffer dst)intread(ByteBuffer dst, long position)longsize()StringtoString()FileChanneltruncate(long newSize)FileLocktryLock(long position, long size, boolean shared)intwrite(ByteBuffer src)intwrite(ByteBuffer src, long position)-
Methods inherited from class org.dizitart.no2.mvstore.compat.v1.mvstore.fs.FileBase
lock, map, read, transferFrom, transferTo, write
-
Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel
close, isOpen
-
-
-
-
Method Detail
-
position
public FileChannel position(long newPosition) throws IOException
- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileBase- Throws:
IOException
-
position
public long position() throws IOException- Specified by:
positionin interfaceSeekableByteChannel- Specified by:
positionin classFileBase- Throws:
IOException
-
read
public int read(ByteBuffer dst) throws IOException
- Specified by:
readin interfaceReadableByteChannel- Specified by:
readin interfaceSeekableByteChannel- Specified by:
readin classFileBase- Throws:
IOException
-
read
public int read(ByteBuffer dst, long position) throws IOException
- Overrides:
readin classFileBase- Throws:
IOException
-
size
public long size() throws IOException- Specified by:
sizein interfaceSeekableByteChannel- Specified by:
sizein classFileBase- Throws:
IOException
-
truncate
public FileChannel truncate(long newSize) throws IOException
- Specified by:
truncatein interfaceSeekableByteChannel- Specified by:
truncatein classFileBase- Throws:
IOException
-
write
public int write(ByteBuffer src, long position) throws IOException
- Overrides:
writein classFileBase- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
writein interfaceSeekableByteChannel- Specified by:
writein interfaceWritableByteChannel- Specified by:
writein classFileBase- Throws:
IOException
-
force
public void force(boolean metaData) throws IOException- Overrides:
forcein classFileBase- Throws:
IOException
-
tryLock
public FileLock tryLock(long position, long size, boolean shared) throws IOException
- Overrides:
tryLockin classFileBase- Throws:
IOException
-
-