Package org.h2.mvstore
Class OffHeapStore
- java.lang.Object
-
- org.h2.mvstore.FileStore<SFChunk>
-
- org.h2.mvstore.RandomAccessStore
-
- org.h2.mvstore.OffHeapStore
-
public class OffHeapStore extends RandomAccessStore
A storage mechanism that "persists" data in the off-heap area of the main memory.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.h2.mvstore.FileStore
FileStore.PageSerializationManager
-
-
Field Summary
-
Fields inherited from class org.h2.mvstore.RandomAccessStore
freeSpace
-
Fields inherited from class org.h2.mvstore.FileStore
lastChunk, META_ID_KEY, PIPE_LENGTH, readBytes, readCount, recoveryMode, saveChunkLock, storeHeader, writeBytes, writeCount
-
-
Constructor Summary
Constructors Constructor Description OffHeapStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbackup(java.util.zip.ZipOutputStream out)voidfree(long pos, int length)Mark the space as free.intgetDefaultRetentionTime()Get the default retention time for this store in milliseconds.OffHeapStoreopen(java.lang.String fileName, boolean readOnly)voidopen(java.lang.String fileName, boolean readOnly, char[] encryptionKey)java.nio.ByteBufferreadFully(SFChunk chunk, long pos, int len)Read data from the store.java.lang.StringtoString()voidtruncate(long size)voidwriteFully(SFChunk chunk, long pos, java.nio.ByteBuffer src)Write to the file.-
Methods inherited from class org.h2.mvstore.RandomAccessStore
adjustStoreToLastChunk, allocateChunkSpace, clear, compactMoveChunks, compactStore, createChunk, createChunk, createChunk, doHousekeeping, freeChunkSpace, getFillRate, getMovePriority, getRewriteCandidates, initializeStoreHeader, isSpaceReused, markUsed, readStoreHeader, setReuseSpace, shouldSaveNow, shrinkStoreIfPossible, validateFileLength, writeChunk, writeCleanShutdownMark
-
Methods inherited from class org.h2.mvstore.FileStore
accountForRemovedPage, bind, close, compact, compactStore, deregisterMapRoot, discoverChunk, dropUnusedChunks, executeFileStoreOperation, findLastChunkWithCompleteValidChunkSet, getAutoCommitDelay, getAutoCompactFillRate, getCacheHitRatio, getCacheSize, getCacheSizeUsed, getChunks, getChunksFillRate, getChunksFromLayoutMap, getCreationTime, getFileName, getLayoutMap, getMaxPageSize, getMetaMapId, getMvStore, getReadBytes, getReadCount, getRetentionTime, getRootPos, getStoreHeader, getTocCacheHitRatio, getWriteBuffer, getWriteCount, hasChangesSince, hasPersistentData, init, initializeCommonHeaderAttributes, isIdle, isKnownVersion, isReadOnly, isRegularMap, lastChunkVersion, populateInfo, processCommonHeaderAttributes, readChunkFooter, readChunkHeaderAndFooter, readChunkHeaderOptionally, readChunkHeaderOptionally, readFully, registerDeadChunk, releaseWriteBuffer, rewriteChunks, rollbackTo, saveChunkMetadataChanges, setAutoCommitDelay, setCacheSize, setLastChunk, setRetentionTime, setSize, size, start, stop, store, submitOrRun, sync, writeCleanShutdown
-
-
-
-
Method Detail
-
open
public void open(java.lang.String fileName, boolean readOnly, char[] encryptionKey)
-
open
public OffHeapStore open(java.lang.String fileName, boolean readOnly)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
readFully
public java.nio.ByteBuffer readFully(SFChunk chunk, long pos, int len)
Description copied from class:FileStoreRead data from the store.
-
free
public void free(long pos, int length)Description copied from class:RandomAccessStoreMark the space as free.- Overrides:
freein classRandomAccessStore- Parameters:
pos- the position in byteslength- the number of bytes
-
writeFully
public void writeFully(SFChunk chunk, long pos, java.nio.ByteBuffer src)
Description copied from class:FileStoreWrite to the file.- Specified by:
writeFullyin classFileStore<SFChunk>- Parameters:
chunk- to writepos- the write positionsrc- the source buffer
-
truncate
public void truncate(long size)
- Specified by:
truncatein classRandomAccessStore
-
getDefaultRetentionTime
public int getDefaultRetentionTime()
Description copied from class:FileStoreGet the default retention time for this store in milliseconds.- Overrides:
getDefaultRetentionTimein classFileStore<SFChunk>- Returns:
- the retention time
-
-