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 void
force(boolean metaData)
long
position()
FileChannel
position(long newPosition)
int
read(ByteBuffer dst)
int
read(ByteBuffer dst, long position)
long
size()
String
toString()
FileChannel
truncate(long newSize)
FileLock
tryLock(long position, long size, boolean shared)
int
write(ByteBuffer src)
int
write(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:
position
in interfaceSeekableByteChannel
- Specified by:
position
in classFileBase
- Throws:
IOException
-
position
public long position() throws IOException
- Specified by:
position
in interfaceSeekableByteChannel
- Specified by:
position
in classFileBase
- Throws:
IOException
-
read
public int read(ByteBuffer dst) throws IOException
- Specified by:
read
in interfaceReadableByteChannel
- Specified by:
read
in interfaceSeekableByteChannel
- Specified by:
read
in classFileBase
- Throws:
IOException
-
read
public int read(ByteBuffer dst, long position) throws IOException
- Overrides:
read
in classFileBase
- Throws:
IOException
-
size
public long size() throws IOException
- Specified by:
size
in interfaceSeekableByteChannel
- Specified by:
size
in classFileBase
- Throws:
IOException
-
truncate
public FileChannel truncate(long newSize) throws IOException
- Specified by:
truncate
in interfaceSeekableByteChannel
- Specified by:
truncate
in classFileBase
- Throws:
IOException
-
write
public int write(ByteBuffer src, long position) throws IOException
- Overrides:
write
in classFileBase
- Throws:
IOException
-
write
public int write(ByteBuffer src) throws IOException
- Specified by:
write
in interfaceSeekableByteChannel
- Specified by:
write
in interfaceWritableByteChannel
- Specified by:
write
in classFileBase
- Throws:
IOException
-
force
public void force(boolean metaData) throws IOException
- Overrides:
force
in classFileBase
- Throws:
IOException
-
tryLock
public FileLock tryLock(long position, long size, boolean shared) throws IOException
- Overrides:
tryLock
in classFileBase
- Throws:
IOException
-
-