Package org.basex.core.cmd
Class Restore
java.lang.Object
org.basex.core.jobs.Job
org.basex.core.Command
org.basex.core.cmd.Restore
Evaluates the 'restore' command and restores a backup of a database.
- Author:
- BaseX Team 2005-21, BSD License, Christian Gruen
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLocks()Adds the strings (databases, special identifiers) for which locks need to be acquired.booleanCloses an open data reference and returnstrueif this command will change theContext.data()reference.static voidrestore(String db, String backup, StaticOptions sopts, Restore cmd) Restores the specified database.protected booleanrun()Executes the command and serializes the result (internal call).Returns short progress information.booleanReturns true if this command returns a progress value.Methods inherited from class org.basex.core.Command
addLocks, baseURI, baseURI, build, close, error, exception, execute, execute, getOption, getOption, info, info, init, maxResults, result, run, run, setInput, setInput, stoppable, toString, toString, updated, updatingMethods inherited from class org.basex.core.jobs.Job
active, checkStop, detailedInfo, jc, memory, popJob, progressInfo, pushJob, register, state, stop, stopped, timeout, unregister
-
Constructor Details
-
Restore
Default constructor.- Parameters:
arg- optional argument
-
-
Method Details
-
run
protected boolean run()Description copied from class:CommandExecutes the command and serializes the result (internal call). -
addLocks
public void addLocks()Description copied from class:JobAdds the strings (databases, special identifiers) for which locks need to be acquired. -
restore
public static void restore(String db, String backup, StaticOptions sopts, Restore cmd) throws IOException Restores the specified database.- Parameters:
db- name of databasebackup- name of backupsopts- static optionscmd- calling command instance- Throws:
IOException- I/O exception
-
shortInfo
Description copied from class:JobReturns short progress information. Can be overwritten to give more specific feedback. -
newData
Description copied from class:CommandCloses an open data reference and returnstrueif this command will change theContext.data()reference. This method is only required by the GUI. -
supportsProg
public boolean supportsProg()Description copied from class:CommandReturns true if this command returns a progress value. This method is only required by the GUI.- Overrides:
supportsProgin classCommand- Returns:
- result of check
-