public class Recover extends Tool implements DataHandler
| Constructor and Description |
|---|
Recover() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPowerOff()
INTERNAL
|
void |
checkWritingAllowed()
INTERNAL
|
static void |
execute(java.lang.String dir,
java.lang.String db)
Dumps the contents of a database to a SQL script file.
|
CompareMode |
getCompareMode()
Return compare mode.
|
java.lang.String |
getDatabasePath()
INTERNAL
|
JavaObjectSerializer |
getJavaObjectSerializer()
Return the serializer to be used for java objects being stored in
column of type OTHER.
|
java.lang.String |
getLobCompressionAlgorithm(int type)
INTERNAL
|
SmallLRUCache<java.lang.String,java.lang.String[]> |
getLobFileListCache()
INTERNAL
|
LobStorageBackend |
getLobStorage()
INTERNAL
|
java.lang.Object |
getLobSyncObject()
INTERNAL
|
int |
getMaxLengthInplaceLob()
INTERNAL
|
TempFileDeleter |
getTempFileDeleter()
INTERNAL
|
static void |
main(java.lang.String... args)
Options are case sensitive.
|
FileStore |
openFile(java.lang.String name,
java.lang.String mode,
boolean mustExist)
INTERNAL
|
static java.io.InputStream |
readBlob(java.lang.String fileName)
INTERNAL
|
static Value.ValueBlob |
readBlobDb(java.sql.Connection conn,
long lobId,
long precision)
INTERNAL
|
static java.io.InputStream |
readBlobMap(java.sql.Connection conn,
long lobId,
long precision)
INTERNAL
|
static java.io.Reader |
readClob(java.lang.String fileName)
INTERNAL
|
static Value.ValueClob |
readClobDb(java.sql.Connection conn,
long lobId,
long precision)
INTERNAL
|
static java.io.Reader |
readClobMap(java.sql.Connection conn,
long lobId,
long precision)
INTERNAL
|
int |
readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
INTERNAL
|
void |
runTool(java.lang.String... args)
Dumps the contents of a database file to a human readable text file.
|
isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, throwUnsupportedOptionpublic static void main(java.lang.String... args)
throws java.sql.SQLException
| [-help] or [-?] | Print the list of options |
| [-dir <dir>] | The directory (default: .) |
| [-db <database>] | The database name (all databases if not set) |
| [-trace] | Print additional trace information |
| [-transactionLog] | Print the transaction log |
args - the command line argumentsjava.sql.SQLExceptionpublic void runTool(java.lang.String... args)
throws java.sql.SQLException
public static java.io.Reader readClob(java.lang.String fileName)
throws java.io.IOException
java.io.IOExceptionpublic static java.io.InputStream readBlob(java.lang.String fileName)
throws java.io.IOException
java.io.IOExceptionpublic static Value.ValueBlob readBlobDb(java.sql.Connection conn, long lobId, long precision)
public static Value.ValueClob readClobDb(java.sql.Connection conn, long lobId, long precision)
public static java.io.InputStream readBlobMap(java.sql.Connection conn,
long lobId,
long precision)
throws java.sql.SQLException
java.sql.SQLExceptionpublic static java.io.Reader readClobMap(java.sql.Connection conn,
long lobId,
long precision)
throws java.lang.Exception
java.lang.Exceptionpublic static void execute(java.lang.String dir,
java.lang.String db)
throws java.sql.SQLException
dir - the directorydb - the database name (null for all databases)java.sql.SQLExceptionpublic java.lang.String getDatabasePath()
getDatabasePath in interface DataHandlerpublic FileStore openFile(java.lang.String name, java.lang.String mode, boolean mustExist)
openFile in interface DataHandlername - the file namemode - the modemustExist - whether the file must already existpublic void checkPowerOff()
checkPowerOff in interface DataHandlerpublic void checkWritingAllowed()
checkWritingAllowed in interface DataHandlerpublic int getMaxLengthInplaceLob()
getMaxLengthInplaceLob in interface DataHandlerpublic java.lang.String getLobCompressionAlgorithm(int type)
getLobCompressionAlgorithm in interface DataHandlertype - the data type (CLOB or BLOB)public java.lang.Object getLobSyncObject()
getLobSyncObject in interface DataHandlerpublic SmallLRUCache<java.lang.String,java.lang.String[]> getLobFileListCache()
getLobFileListCache in interface DataHandlerpublic TempFileDeleter getTempFileDeleter()
getTempFileDeleter in interface DataHandlerpublic LobStorageBackend getLobStorage()
getLobStorage in interface DataHandlerpublic int readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
readLob in interface DataHandlerlobId - the lob idhmac - the message authentication codeoffset - the offset within the lobbuff - the target bufferoff - the offset within the target bufferlength - the number of bytes to readpublic JavaObjectSerializer getJavaObjectSerializer()
DataHandlergetJavaObjectSerializer in interface DataHandlerpublic CompareMode getCompareMode()
DataHandlergetCompareMode in interface DataHandler