| Modifier and Type | Class and Description |
|---|---|
| public static class | MVStore.
A builder for an MVStore. |
| public static class | MVStore.
Class TxCounter is a simple data structure to hold version of the store along with the counter of open transactions, which are still operating on this version. |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| public final Thread. | |
| private final int | compressionLevel
The compression level for new pages (0 for disabled, 1 for fast, 2 for high). |
| private Compressor | |
| private Compressor | |
| private volatile MVStore. | currentTxCounter
Counter of open transactions for the latest (current) store version |
| private volatile long | |
| private final FileStore | |
| private final boolean | |
| pack-priv static final long | INITIAL_VERSION
This designates the "last stored" version for a store which was just open for the first time. |
| private final int | |
| private final AtomicInteger | |
| private long | |
| private long | |
| private final ConcurrentHashMap | |
| private final MVMap | meta
The metadata map. |
| private volatile boolean | |
| private long | |
| private final AtomicLong | oldestVersionToKeep
Oldest store version in use. |
| private volatile LongConsumer | oldestVersionTracker
Callback for maintenance after some unused store versions were dropped |
| private volatile MVStoreException | |
| private volatile boolean | |
| private volatile int | |
| private static final int | STATE_CLOSED
Store is closed. |
| private static final int | STATE_OPEN
Store is open. |
| private static final int | STATE_STOPPING
Store is about to close now, but is still operational. |
| private final ReentrantLock | storeLock
Lock which governs access to major store operations: store(), close(), ... |
| private final AtomicBoolean | storeOperationInProgress
Flag to refine the state under storeLock. |
| private int | unsavedMemory
The estimated memory used by unsaved pages. |
| private long | |
| private long | |
| private final Deque | versions
Ordered collection of all version usage counters for all versions starting from oldestVersionToKeep and up to current. |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | accountForRemovedPage(long
the position of the page pos, long at which page was removed version, boolean whether page is considered pinned pinned, int sequential page number within chunk pageNo)Remove a page. |
| pack-priv void | |
| pack-priv void | |
| private boolean | |
| private void | |
| private void | |
| public void | |
| public void | close(int
time (in milliseconds) allotted for file
compaction activity, 0 means no compaction,
-1 means unlimited time (full compaction) allowedCompactionTime)Close the store. |
| public void | |
| private void | |
| private ArrayList | |
| public long | Returns: the new version (incremented if there were changes) or -1 if there were no commitCommit the changes. |
| private long | |
| public boolean | Returns: if any chunk was re-writtenthe minimum percentage of live entries targetFillRate, int the minimum number of bytes to write write)Try to increase the fill rate by re-writing partially full chunks. |
| public void | compactFile(int
the maximum time in milliseconds to compact maxCompactTime)Compact store file, that is, compact blocks that have a low fill rate, and move chunks next to each other. |
| public void | |
| public boolean | Returns: true if counter reaches zero, which indicates that version is no longer in use, false otherwise.to be decremented, obtained from registerVersionUsage() txCounterDe-register (close) completed operation (transaction). |
| pack-priv void | deregisterMapRoot(int
to deregister mapId)Performs final stage of map removal - delete root location info from the layout table. |
| public void | deregisterVersionUsage(MVStore.
to be decremented, obtained from registerVersionUsage() txCounterDe-register (close) completed operation (transaction). |
| private void | |
| public void | |
| public int | Returns: the delay in milliseconds, or 0 if auto-commit is disabled.Get the auto-commit delay. |
| public int | Returns: the memory in bytesGet the maximum memory (in bytes) used for unsaved pages. |
| public int | |
| public int | Returns: the amount of memory used for cachingGet the amount of memory used for caching, in MB. |
| pack-priv int | |
| pack-priv Compressor | |
| pack-priv Compressor | |
| public long | |
| public FileStore | |
| public int | |
| public int | |
| pack-priv int | |
| public Map | |
| private int | |
| public < the key type K, the value type V> MVMap | |
| private int | |
| public String | |
| public Set | |
| public long | |
| public MVMap | |
| private int | |
| pack-priv long | |
| public MVStoreException | |
| public int | |
| private long | |
| public Map | |
| public int | |
| public long | |
| public int | |
| private double | |
| public long | Returns: the versionGet the oldest version to retain in memory (for in-memory stores). |
| pack-priv boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | Returns: true if store is open, false otherwiseDetermine that store is open, or wait for it to be closed (by other thread) |
| private boolean | Returns: true if all data can be readthe version version)Check whether all data can be read from this version. |
| pack-priv boolean | |
| private boolean | |
| public boolean | Returns: true if persistentIndicates whether this MVStore is backed by FileStore, and therefore it's data will survive this store closure (but not necessary process termination in case of in-memory store). |
| public boolean | |
| private boolean | |
| public boolean | |
| public boolean | Returns: true if versions are rolling, false otherwiseIndicates whether store versions are rolling. |
| pack-priv void | |
| private boolean | |
| pack-priv void | |
| public static MVStore | |
| public < the key type K, the value type V> MVMap | |
| public < the map type M extends MVMapthe key type K, the value type V> M | Returns: the mapthe name of the map name, MVMap.the map builder builderOpen a map with the given builder. |
| public < the map type M extends MVMapthe key type K, the value type V> M | Returns: the mapthe map id id, MVMap.the map builder builderOpen an existing map with the given builder. |
| public MVMap | |
| public void | |
| public void | |
| pack-priv < key type K, value type V> Page | |
| public void | registerUnsavedMemory(int
adjustment memory)Adjust amount of "unsaved memory" meaning amount of RAM occupied by pages not saved yet to the file. |
| pack-priv void | |
| public MVStore. | Returns: TxCounter to be decremented when operation finishes (transaction closed).Register opened operation (transaction). |
| public void | |
| public void | |
| public void | |
| private boolean | |
| pack-priv void | |
| public void | |
| public void | |
| private void | |
| public void | setAutoCommitDelay(int
the maximum delay millis)Set the maximum delay in milliseconds to auto-commit changes. |
| public void | |
| pack-priv void | |
| private void | |
| public void | |
| public void | setRetentionTime(int
how many milliseconds to retain old chunks (0 to overwrite them
as early as possible) ms)How long to retain old, persisted chunks, in milliseconds. |
| public void | |
| public void | |
| public void | setVersionsToKeep(int
the number of versions to keep count)How many versions to retain for in-memory stores. |
| private void | |
| private long | |
| pack-priv void | |
| private void | |
| public void | |
| public long | Returns: the new version (incremented if there were changes) or -1 if there were no commitUnlike regular commit this method returns immediately if there is commit in progress on another thread, otherwise it acts as regular commit. |
| private long | |
| pack-priv <R> R | |
| private void |