Package org.h2.mvstore

# Class RootReference<K,V>

java.lang.Object
org.h2.mvstore.RootReference<K,V>

public final class RootReference<K,V> extends Object
Class RootReference is an immutable structure to represent state of the MVMap as a whole (not related to a particular B-Tree node). Single structure would allow for non-blocking atomic state change. The most important part of it is a reference to the root node.

## Field Summary

Fields
Modifier and Type
Field
Description
`final Page<K,V>`
`root`
The root page.
`final long`
`version`
The version used for writing.

## Method Summary

Modifier and Type
Method
Description
`long`
`getTotalCount()`
`boolean`
`isLockedByCurrentThread()`
`boolean`
`needFlush()`
Whether flushing is needed.
`String`
`toString()`

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

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

## Field Details

### root

public final Page<K,V> root
The root page.

### version

public final long version
The version used for writing.

## Method Details

### isLockedByCurrentThread

public boolean isLockedByCurrentThread()

### needFlush

public boolean needFlush()
Whether flushing is needed.

Returns:
  true if yes

### getTotalCount

public long getTotalCount()

### toString

public String toString()

Overrides:
  `toString` in class `Object`