public class PostgresProcess extends AbstractPGProcess<PostgresExecutable,PostgresProcess>
| Constructor and Description |
|---|
PostgresProcess(de.flapdoodle.embed.process.distribution.Distribution distribution,
PostgresConfig config,
de.flapdoodle.embed.process.config.IRuntimeConfig runtimeConfig,
PostgresExecutable executable) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
cleanupInternal() |
protected void |
deleteTempFiles() |
void |
exportDataToFile(File file) |
void |
exportSchemeToFile(File file) |
void |
exportToFile(File file) |
protected List<String> |
getCommandLine(de.flapdoodle.embed.process.distribution.Distribution distribution,
PostgresConfig config,
de.flapdoodle.embed.process.extract.IExtractedFileSet exe) |
void |
importFromFile(File file)
Import into database from file
|
void |
importFromFileWithArgs(File file,
String... cliArgs)
Import into database from file with additional args
|
boolean |
isProcessReady() |
protected void |
onAfterProcessStart(de.flapdoodle.embed.process.runtime.ProcessControl process,
de.flapdoodle.embed.process.config.IRuntimeConfig runtimeConfig) |
protected void |
onBeforeProcess(de.flapdoodle.embed.process.config.IRuntimeConfig runtimeConfig) |
void |
restoreFromFile(File file,
String... cliArgs)
Import into database from file with additional args
|
protected boolean |
sendStopToPostgresqlInstance() |
protected void |
stopInternal() |
onBeforeProcessStartgetConfig, getEnvironment, getPidFromFile, getProcessId, isProcessRunning, isRegisteredJobKiller, onAfterProcessStop, pidFile, pidFile, sendKillToProcess, sendTermToProcess, setProcessId, stop, stopProcess, tryKillToProcess, waitFor, writePidFilepublic PostgresProcess(de.flapdoodle.embed.process.distribution.Distribution distribution,
PostgresConfig config,
de.flapdoodle.embed.process.config.IRuntimeConfig runtimeConfig,
PostgresExecutable executable)
throws IOException
IOExceptionprotected void stopInternal()
stopInternal in class AbstractPGProcess<PostgresExecutable,PostgresProcess>protected final boolean sendStopToPostgresqlInstance()
protected void onBeforeProcess(de.flapdoodle.embed.process.config.IRuntimeConfig runtimeConfig)
throws IOException
onBeforeProcess in class de.flapdoodle.embed.process.runtime.AbstractProcess<PostgresConfig,PostgresExecutable,PostgresProcess>IOExceptionprotected List<String> getCommandLine(de.flapdoodle.embed.process.distribution.Distribution distribution, PostgresConfig config, de.flapdoodle.embed.process.extract.IExtractedFileSet exe) throws IOException
getCommandLine in class de.flapdoodle.embed.process.runtime.AbstractProcess<PostgresConfig,PostgresExecutable,PostgresProcess>IOExceptionprotected void deleteTempFiles()
protected final void onAfterProcessStart(de.flapdoodle.embed.process.runtime.ProcessControl process,
de.flapdoodle.embed.process.config.IRuntimeConfig runtimeConfig)
throws IOException
onAfterProcessStart in class de.flapdoodle.embed.process.runtime.AbstractProcess<PostgresConfig,PostgresExecutable,PostgresProcess>IOExceptionpublic void importFromFile(File file)
file - The file to import into databasepublic void importFromFileWithArgs(File file, String... cliArgs)
file - cliArgs - additional arguments for psql (be sure to separate args from their values)public void restoreFromFile(File file, String... cliArgs)
file - cliArgs - additional arguments for psql (be sure to separate args from their values)public void exportToFile(File file)
public void exportSchemeToFile(File file)
public void exportDataToFile(File file)
public boolean isProcessReady()
protected void cleanupInternal()
cleanupInternal in class AbstractPGProcess<PostgresExecutable,PostgresProcess>Copyright © 2018 Yandex. All rights reserved.