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 boolean
static void
dumpDatabase
(Database pd, AoservDaemonProtocol.Version protocolVersion, StreamableOutput masterOut, boolean gzip) int
Since the VACUUM FULL and REINDEX commands use exclusive locks on each table, we want it to finish as soon as possible.void
run
(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year) static void
start()
static void
Methods inherited from class com.aoindustries.aoserv.daemon.util.BuilderThread
getMaximumDelay, getMinimumDelay, getProcessTimerMaximumTime, getProcessTimerReminderInterval, getProcessTimerSubject, getRandomDelay, packageListUpdated, tableUpdated, waitForBuild
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.aoapps.cron.CronJob
getExecutor, getName, getScheduleMode
-
Method Details
-
doRebuild
protected boolean doRebuild()- Specified by:
doRebuild
in classBuilderThread
- Returns:
true
if successful orfalse
if unsuccessful and needs to be retried.
-
dumpDatabase
public static void dumpDatabase(Database pd, AoservDaemonProtocol.Version protocolVersion, StreamableOutput masterOut, boolean gzip) throws IOException, SQLException - Throws:
IOException
SQLException
-
start
- Throws:
IOException
SQLException
-
waitForRebuild
public static void waitForRebuild() -
getProcessTimerDescription
- Specified by:
getProcessTimerDescription
in classBuilderThread
-
getSchedule
- Specified by:
getSchedule
in 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:
getThreadPriority
in interfaceCronJob
-
run
public void run(int minute, int hour, int dayOfMonth, int month, int dayOfWeek, int year)
-