| Modifier and Type | Class and Description |
|---|---|
| private static class | MVStoreTool.
A data type that can read any data that is persisted, and converts it to a byte array. |
| Modifier and Type | Field and Description |
|---|---|
| public static final int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static void | |
| public static void | |
| public static void | compactCleanUp(String
the file name fileName)Clean up if needed, in a case a compact operation was interrupted due to killing the process or a power failure. |
| public static void | |
| public static void | |
| private static String | |
| private static Compressor | |
| pack-priv static MVMap. | |
| private static int | |
| public static void | |
| public static String | |
| public static void | |
| public static void | moveAtomicReplace(String
the old fully qualified file name of the store sourceName, String the new fully qualified file name of the store destinationName)Rename a file(s) of the named store, and try to atomically replace an existing file(s) of another store. |
| public static void | |
| public static long |
| MAX_NB_FILE_HEADERS_PER_FILE | back to summary |
|---|---|
| public static final int MAX_NB_FILE_HEADERS_PER_FILE | |
| MVStoreTool | back to summary |
|---|---|
| public MVStoreTool() | |
| compact | back to summary |
|---|---|
| public static void compact(String fileName, boolean compress) Compress the store by creating a new file and copying the live pages there. Temporarily, a file with the suffix ".tempFile" is created. This file is then renamed, replacing the original file, if possible. If not, the new file is renamed to ".newFile", then the old file is removed, and the new file is renamed. This might be interrupted, so it's better to compactCleanUp before opening a store, in case this method was used.
| |
| compact | back to summary |
|---|---|
| public static void compact(String sourceFileName, String targetFileName, boolean compress) Copy all live pages from the source store to the target store. | |
| compact | back to summary |
|---|---|
| public static void compact(MVStore source, MVStore target) Copy all live pages from the source store to the target store. | |
| compactCleanUp | back to summary |
|---|---|
| public static void compactCleanUp(String fileName) Clean up if needed, in a case a compact operation was interrupted due to killing the process or a power failure. This will delete temporary files (if any), and in case atomic file replacements were not used, rename the new file.
| |
| dump | back to summary |
|---|---|
| public static void dump(String fileName, boolean details) Read the contents of the file and write them to system out.
| |
| dump | back to summary |
|---|---|
| public static void dump(String fileName, Writer writer, boolean details) Read the contents of the file and display them in a human-readable format. | |
| formatTimestamp | back to summary |
|---|---|
| private static String formatTimestamp(long t, long start) | |
| getCompressor | back to summary |
|---|---|
| private static Compressor getCompressor(boolean fast) | |
| getGenericMapBuilder | back to summary |
|---|---|
pack-priv static MVMap.
| |
| getPercent | back to summary |
|---|---|
| private static int getPercent(long value, long max) | |
| info | back to summary |
|---|---|
| public static void info(String fileName) Read the summary information of the file and write them to system out.
| |
| info | back to summary |
|---|---|
| public static String info(String fileName, Writer writer) Read the summary information of the file and write them to system out. | |
| main | back to summary | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| public static void main(String... args) Runs this tool. Options are case sensitive. Supported options are:
| |||||||||
| moveAtomicReplace | back to summary |
|---|---|
| public static void moveAtomicReplace(String sourceName, String destinationName) Rename a file(s) of the named store, and try to atomically replace an existing file(s) of another store. | |
| repair | back to summary |
|---|---|
| public static void repair(String fileName) Repair a store by rolling back to the newest good version.
| |
| rollback | back to summary |
|---|---|
| public static long rollback(String fileName, long targetVersion, Writer writer) Roll back to a given revision into a file called *.temp. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static MVStoreTool. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public byte[][] | createStorage(int
number of values to hold size)Implements org. Create storage object of array type to hold values |
| public int | getMemory(byte[]
the object obj)Implements abstract org. Implements org. Calculates the amount of used memory in bytes. |
| public boolean | isMemoryEstimationAllowed()
Overrides org. Implements org. Whether memory estimation based on previously seen values is allowed/desirable |
| public byte[] | read(ByteBuffer
the source buffer buff)Implements abstract org. Implements org. Read an object. |
| public void | write(WriteBuffer
the target buffer buff, byte[] the value obj)Implements abstract org. Implements org. Write an object. |
| INSTANCE | back to summary |
|---|---|
| pack-priv static MVStoreTool. | |
| GenericDataType | back to summary |
|---|---|
| private GenericDataType() | |
| createStorage | back to summary |
|---|---|
| public byte[][] createStorage(int size) Implements org. Doc from org. Create storage object of array type to hold values
| |
| getMemory | back to summary |
|---|---|
| public int getMemory(byte[] obj) Implements abstract org. Implements org. Doc from org. Calculates the amount of used memory in bytes.
| |
| isMemoryEstimationAllowed | back to summary |
|---|---|
| public boolean isMemoryEstimationAllowed() Overrides org. Implements org. Doc from org. Whether memory estimation based on previously seen values is allowed/desirable
| |
| read | back to summary |
|---|---|
| public byte[] read(ByteBuffer buff) Implements abstract org. Implements org. Doc from org. Read an object.
| |
| write | back to summary |
|---|---|
| public void write(WriteBuffer buff, byte[] obj) Implements abstract org. Implements org. Doc from org. Write an object.
| |