use of org.exist.scheduler.SystemTaskJob in project exist by eXist-db.
the class LocalDatabaseInstanceManager method shutdown.
@Override
public void shutdown(final long delay) throws XMLDBException {
if (!user.hasDbaRole()) {
throw new XMLDBException(ErrorCodes.PERMISSION_DENIED, "only users in group dba may shut down the database");
}
final SystemTaskJob shutdownJob = new SystemTaskJobImpl("xmldb:local-api.shutdown", new ShutdownTask());
brokerPool.getScheduler().createPeriodicJob(0, shutdownJob, delay, new Properties(), 0);
}
Aggregations