Class PostgresDatabaseManager
java.lang.Object
com.aoindustries.aoserv.daemon.util.BuilderThread
com.aoindustries.aoserv.daemon.postgres.PostgresDatabaseManager
- All Implemented Interfaces:
CronJob,TableListener,PackageManager.PackageListener
Controls the PostgreSQL server.
- Author:
- AO Industries, Inc.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.aoapps.cron.CronJob
CronJob.Executor, CronJob.ScheduleMode -
Field Summary
Fields inherited from class com.aoindustries.aoserv.daemon.util.BuilderThread
DEFAULT_MAXIMUM_DELAY, DEFAULT_MINIMUM_DELAY, DEFAULT_PROCESS_TIMER_MAXIMUM_TIME, DEFAULT_PROCESS_TIMER_REMINDER_INTERVAL -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic voiddumpDatabase(Database pd, AoservDaemonProtocol.Version protocolVersion, StreamableOutput masterOut, boolean gzip) intSince the VACUUM FULL and REINDEX commands use exclusive locks on each table, we want it to finish as soon as possible.voidrun(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year) static voidstart()static voidMethods inherited from class com.aoindustries.aoserv.daemon.util.BuilderThread
getMaximumDelay, getMinimumDelay, getProcessTimerMaximumTime, getProcessTimerReminderInterval, getProcessTimerSubject, getRandomDelay, packageListUpdated, tableUpdated, waitForBuildMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.aoapps.cron.CronJob
getExecutor, getName, getScheduleMode
-
Method Details
-
doRebuild
protected boolean doRebuild()- Specified by:
doRebuildin classBuilderThread- Returns:
trueif successful orfalseif unsuccessful and needs to be retried.
-
dumpDatabase
public static void dumpDatabase(Database pd, AoservDaemonProtocol.Version protocolVersion, StreamableOutput masterOut, boolean gzip) throws IOException, SQLException - Throws:
IOExceptionSQLException
-
start
- Throws:
IOExceptionSQLException
-
waitForRebuild
public static void waitForRebuild() -
getProcessTimerDescription
- Specified by:
getProcessTimerDescriptionin classBuilderThread
-
getSchedule
- Specified by:
getSchedulein interfaceCronJob
-
getThreadPriority
public int getThreadPriority()Since the VACUUM FULL and REINDEX commands use exclusive locks on each table, we want it to finish as soon as possible.- Specified by:
getThreadPriorityin interfaceCronJob
-
run
public void run(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year)
-
