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(String dir,
String db)
Dumps the contents of a database to a SQL script file.
|
CompareMode |
getCompareMode()
Return compare mode.
|
String |
getDatabasePath()
INTERNAL
|
JavaObjectSerializer |
getJavaObjectSerializer()
Return the serializer to be used for java objects being stored in
column of type OTHER.
|
String |
getLobCompressionAlgorithm(int type)
INTERNAL
|
SmallLRUCache<String,String[]> |
getLobFileListCache()
INTERNAL
|
LobStorageBackend |
getLobStorage()
INTERNAL
|
Object |
getLobSyncObject()
INTERNAL
|
int |
getMaxLengthInplaceLob()
INTERNAL
|
TempFileDeleter |
getTempFileDeleter()
INTERNAL
|
static void |
main(String... args)
Options are case sensitive.
|
FileStore |
openFile(String name,
String mode,
boolean mustExist)
INTERNAL
|
static InputStream |
readBlob(String fileName)
INTERNAL
|
static Value.ValueBlob |
readBlobDb(Connection conn,
long lobId,
long precision)
INTERNAL
|
static InputStream |
readBlobMap(Connection conn,
long lobId,
long precision)
INTERNAL
|
static Reader |
readClob(String fileName)
INTERNAL
|
static Value.ValueClob |
readClobDb(Connection conn,
long lobId,
long precision)
INTERNAL
|
static Reader |
readClobMap(Connection conn,
long lobId,
long precision)
INTERNAL
|
int |
readLob(long lobId,
byte[] hmac,
long offset,
byte[] buff,
int off,
int length)
INTERNAL
|
void |
runTool(String... args)
Dumps the contents of a database file to a human readable text file.
|
isOption, printNoDatabaseFilesFound, setOut, showUsage, showUsageAndThrowUnsupportedOption, throwUnsupportedOption
public static void main(String... args) throws 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 argumentsSQLException
public void runTool(String... args) throws SQLException
runTool
in class Tool
args
- the command line argumentsSQLException
public static Reader readClob(String fileName) throws IOException
IOException
public static InputStream readBlob(String fileName) throws IOException
IOException
public static Value.ValueBlob readBlobDb(Connection conn, long lobId, long precision)
public static Value.ValueClob readClobDb(Connection conn, long lobId, long precision)
public static InputStream readBlobMap(Connection conn, long lobId, long precision) throws SQLException
SQLException
public static Reader readClobMap(Connection conn, long lobId, long precision) throws Exception
Exception
public static void execute(String dir, String db) throws SQLException
dir
- the directorydb
- the database name (null for all databases)SQLException
public String getDatabasePath()
getDatabasePath
in interface DataHandler
public FileStore openFile(String name, String mode, boolean mustExist)
openFile
in interface DataHandler
name
- the file namemode
- the modemustExist
- whether the file must already existpublic void checkPowerOff()
checkPowerOff
in interface DataHandler
public void checkWritingAllowed()
checkWritingAllowed
in interface DataHandler
public int getMaxLengthInplaceLob()
getMaxLengthInplaceLob
in interface DataHandler
public String getLobCompressionAlgorithm(int type)
getLobCompressionAlgorithm
in interface DataHandler
type
- the data type (CLOB or BLOB)public Object getLobSyncObject()
getLobSyncObject
in interface DataHandler
public SmallLRUCache<String,String[]> getLobFileListCache()
getLobFileListCache
in interface DataHandler
public TempFileDeleter getTempFileDeleter()
getTempFileDeleter
in interface DataHandler
public LobStorageBackend getLobStorage()
getLobStorage
in interface DataHandler
public int readLob(long lobId, byte[] hmac, long offset, byte[] buff, int off, int length)
readLob
in interface DataHandler
lobId
- 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()
DataHandler
getJavaObjectSerializer
in interface DataHandler
public CompareMode getCompareMode()
DataHandler
getCompareMode
in interface DataHandler
Copyright © 2020 JBoss by Red Hat. All rights reserved.