public class SingleFileStore extends RandomAccessStore
FileStore.PageSerializationManagerfreeSpacelastChunk, META_ID_KEY, PIPE_LENGTH, readBytes, readCount, recoveryMode, saveChunkLock, storeHeader, writeBytes, writeCount| Constructor and Description |
|---|
SingleFileStore(java.util.Map<java.lang.String,java.lang.Object> config) |
| Modifier and Type | Method and Description |
|---|---|
void |
backup(java.util.zip.ZipOutputStream out) |
void |
close()
Close this store.
|
static java.lang.String |
correctFileName(java.lang.String f)
Fix the file name, replacing backslash with slash.
|
protected long |
getAfterLastBlock_() |
int |
getMovePriority(int block)
Calculates relative "priority" for chunk to be moved.
|
SingleFileStore |
open(java.lang.String fileName,
boolean readOnly) |
void |
open(java.lang.String fileName,
boolean readOnly,
char[] encryptionKey)
Try to open the file.
|
java.nio.ByteBuffer |
readFully(org.h2.mvstore.SFChunk chunk,
long pos,
int len)
Read data from the store.
|
void |
sync()
Flush all changes.
|
java.lang.String |
toString() |
void |
truncate(long size)
Truncate the file.
|
protected void |
writeFully(org.h2.mvstore.SFChunk chunk,
long pos,
java.nio.ByteBuffer src)
Write to the file.
|
adjustStoreToLastChunk, allocateChunkSpace, clear, compactMoveChunks, compactStore, createChunk, createChunk, createChunk, doHousekeeping, free, freeChunkSpace, getFillRate, getRewriteCandidates, initializeStoreHeader, isSpaceReused, markUsed, readStoreHeader, setReuseSpace, shouldSaveNow, shrinkStoreIfPossible, validateFileLength, writeChunk, writeCleanShutdownMarkaccountForRemovedPage, bind, compact, compactStore, deregisterMapRoot, discoverChunk, dropUnusedChunks, executeFilestoreOperation, findLastChunkWithCompleteValidChunkSet, getAutoCommitDelay, getAutoCompactFillRate, getCacheHitRatio, getCacheSize, getCacheSizeUsed, getChunks, getChunksFillRate, getChunksFromLayoutMap, getCreationTime, getDefaultRetentionTime, 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, writeCleanShutdownpublic SingleFileStore(java.util.Map<java.lang.String,java.lang.Object> config)
public java.lang.String toString()
toString in class java.lang.Objectpublic java.nio.ByteBuffer readFully(org.h2.mvstore.SFChunk chunk,
long pos,
int len)
FileStoreprotected void writeFully(org.h2.mvstore.SFChunk chunk,
long pos,
java.nio.ByteBuffer src)
FileStorewriteFully in class FileStore<org.h2.mvstore.SFChunk>chunk - to writepos - the write positionsrc - the source bufferpublic void open(java.lang.String fileName,
boolean readOnly,
char[] encryptionKey)
public SingleFileStore open(java.lang.String fileName, boolean readOnly)
public void close()
public void sync()
public void truncate(long size)
truncate in class RandomAccessStoresize - the new file sizepublic int getMovePriority(int block)
getMovePriority in class RandomAccessStoreblock - where chunk startsprotected long getAfterLastBlock_()
getAfterLastBlock_ in class RandomAccessStorepublic void backup(java.util.zip.ZipOutputStream out)
throws java.io.IOException
public static java.lang.String correctFileName(java.lang.String f)
f - the file name