org.h2.mvstore.db

## Class MVTableEngine.Store

- java.lang.Object
- - org.h2.mvstore.db.MVTableEngine.Store

Enclosing class:
  MVTableEngine

    public static class MVTableEngine.Store
    extends java.lang.Object

A store with open tables.

### Constructor Summary

Constructors
Constructor and Description
`MVTableEngine.Store()`

### Method Summary

Methods
`void` `close(boolean compactFully)` Close the store.
`void` `closeImmediately()` Close the store, without persisting changes.
`void` `compactFile(long maxCompactTime)` Compact the database file, that is, compact blocks that have a low fill rate, and move chunks next to each other.
`MVTable` `createTable(CreateTableData data)` Create a table.
`void` `flush()` Store all pending changes.
`java.util.ArrayList<InDoubtTransaction>` `getInDoubtTransactions()`
`java.io.InputStream` `getInputStream()`
`MVStore` `getMvStore()`
`MVTable` `getTable(java.lang.String tableName)` Get MVTable by table name.
`TransactionStore` `getTransactionStore()`
`java.lang.String` `nextTemporaryMapName()` Get the name of the next available temporary map.
`void` `prepareCommit(Session session, java.lang.String transactionName)` Prepare a transaction.
`void` `removeTable(MVTable table)` Remove a table.
`void` `removeTemporaryMaps(java.util.BitSet objectIds)` Remove all temporary maps.
`void` `setCacheSize(int kb)` Set the maximum memory to be used by the cache.
`java.util.Map<java.lang.String,java.lang.Integer>` `statisticsEnd()` Stop collecting statistics.
`void` `statisticsStart()` Start collecting statistics.
`void` `sync()` Force the changes to disk.

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

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

### Constructor Detail

#### MVTableEngine.Store

    public MVTableEngine.Store()

### Method Detail

#### getMvStore

    public MVStore getMvStore()

#### getTransactionStore

    public TransactionStore getTransactionStore()

#### getTable

    public MVTable getTable(java.lang.String tableName)

Get MVTable by table name.

Parameters:
  `tableName` - table name
Returns:
  MVTable

#### createTable

    public MVTable createTable(CreateTableData data)

Create a table.

Parameters:
  `data` - CreateTableData
Returns:
  table created

#### removeTable

    public void removeTable(MVTable table)

Remove a table.

Parameters:
  `table` - the table

#### flush

    public void flush()

Store all pending changes.

#### closeImmediately

    public void closeImmediately()

Close the store, without persisting changes.

#### removeTemporaryMaps

    public void removeTemporaryMaps(java.util.BitSet objectIds)

Remove all temporary maps.

Parameters:
  `objectIds` - the ids of the objects to keep

#### nextTemporaryMapName

    public java.lang.String nextTemporaryMapName()

Get the name of the next available temporary map.

Returns:
  the map name

#### prepareCommit

    public void prepareCommit(Session session,
                     java.lang.String transactionName)

Prepare a transaction.

Parameters:
  `session` - the session
  `transactionName` - the transaction name (may be null)

#### getInDoubtTransactions

    public java.util.ArrayList<InDoubtTransaction> getInDoubtTransactions()

#### setCacheSize

    public void setCacheSize(int kb)

Set the maximum memory to be used by the cache.

Parameters:
  `kb` - the maximum size in KB

#### getInputStream

    public java.io.InputStream getInputStream()

#### sync

    public void sync()

Force the changes to disk.

#### compactFile

    public void compactFile(long maxCompactTime)

Compact the database file, that is, compact blocks that have a low fill rate, and move chunks next to each other. This will typically shrink the database file. Changes are flushed to the file, and old chunks are overwritten.

Parameters:
  `maxCompactTime` - the maximum time in milliseconds to compact

#### close

    public void close(boolean compactFully)

Close the store. Pending changes are persisted. Chunks with a low fill rate are compacted, but old chunks are kept for some time, so most likely the database file will not shrink.

Parameters:
  `compactFully` - true if storage need to be compacted after closer

#### statisticsStart

    public void statisticsStart()

Start collecting statistics.

#### statisticsEnd

    public java.util.Map<java.lang.String,java.lang.Integer> statisticsEnd()

Stop collecting statistics.

Returns:
  the statistics