Package org.h2.mvstore.cache

# Class FilePathCache.FileCache

java.lang.Object
java.nio.channels.spi.AbstractInterruptibleChannel
java.nio.channels.FileChannel
org.h2.store.fs.FileBase
org.h2.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

Modifier and Type
Method
Description
`void`
`force(boolean metaData)`
`protected void`
`implCloseChannel()`
`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.h2.store.fs.FileBase

`lock, map, read, transferFrom, transferTo, write`

### Methods inherited from class java.nio.channels.FileChannel

`lock, open, open, read, tryLock, write`

### Methods inherited from class java.nio.channels.spi.AbstractInterruptibleChannel

`begin, close, end, isOpen`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.nio.channels.Channel

`isOpen`

## Method Details

### implCloseChannel

protected void implCloseChannel() throws IOException

Overrides:
  `implCloseChannel` in class `FileBase`
Throws:
  `IOException`

### position

public FileChannel position(long newPosition) throws IOException

Specified by:
  `position` in interface `SeekableByteChannel`
Specified by:
  `position` in class `FileChannel`
Throws:
  `IOException`

### position

public long position() throws IOException

Specified by:
  `position` in interface `SeekableByteChannel`
Specified by:
  `position` in class `FileChannel`
Throws:
  `IOException`

### read

public int read(ByteBuffer dst) throws IOException

Specified by:
  `read` in interface `ReadableByteChannel`
Specified by:
  `read` in interface `SeekableByteChannel`
Specified by:
  `read` in class `FileChannel`
Throws:
  `IOException`

### read

public int read(ByteBuffer dst, long position) throws IOException

Overrides:
  `read` in class `FileBase`
Throws:
  `IOException`

### size

public long size() throws IOException

Specified by:
  `size` in interface `SeekableByteChannel`
Specified by:
  `size` in class `FileChannel`
Throws:
  `IOException`

### truncate

public FileChannel truncate(long newSize) throws IOException

Specified by:
  `truncate` in interface `SeekableByteChannel`
Specified by:
  `truncate` in class `FileChannel`
Throws:
  `IOException`

### write

public int write(ByteBuffer src, long position) throws IOException

Overrides:
  `write` in class `FileBase`
Throws:
  `IOException`

### write

public int write(ByteBuffer src) throws IOException

Specified by:
  `write` in interface `SeekableByteChannel`
Specified by:
  `write` in interface `WritableByteChannel`
Specified by:
  `write` in class `FileChannel`
Throws:
  `IOException`

### force

public void force(boolean metaData) throws IOException

Overrides:
  `force` in class `FileBase`
Throws:
  `IOException`

### tryLock

public FileLock tryLock(long position, long size, boolean shared) throws IOException

Overrides:
  `tryLock` in class `FileBase`
Throws:
  `IOException`

### toString

public String toString()

Overrides:
  `toString` in class `Object`