Package org.exist.management

Examples of org.exist.management.Agent.changeStatus()


    public void execute(DBBroker broker) throws EXistException {
        final Agent agentInstance = AgentFactory.getInstance();
        final BrokerPool brokerPool = broker.getBrokerPool();
        final TaskStatus endStatus = new TaskStatus(TaskStatus.Status.STOPPED_OK);

        agentInstance.changeStatus(brokerPool, new TaskStatus(TaskStatus.Status.INIT));

        if (paused) {
            LOG.info("Consistency check is paused.");
            agentInstance.changeStatus(brokerPool, new TaskStatus(TaskStatus.Status.PAUSED));
            return;
View Full Code Here


        agentInstance.changeStatus(brokerPool, new TaskStatus(TaskStatus.Status.INIT));

        if (paused) {
            LOG.info("Consistency check is paused.");
            agentInstance.changeStatus(brokerPool, new TaskStatus(TaskStatus.Status.PAUSED));
            return;
        }

        brokerPool.getProcessMonitor().startJob(ProcessMonitor.ACTION_BACKUP, null, monitor);
View Full Code Here

               
                report = openLog();
                final CheckCallback cb = new CheckCallback(report);

                final ConsistencyCheck check = new ConsistencyCheck(broker, false, checkDocs);
                agentInstance.changeStatus(brokerPool, new TaskStatus(TaskStatus.Status.RUNNING_CHECK));
                errors = check.checkAll(cb);
               
                if (!errors.isEmpty()) {
                    endStatus.setStatus(TaskStatus.Status.STOPPED_ERROR);
                    endStatus.setReason(errors);
View Full Code Here

            if (doBackup) {
                LOG.info("Starting backup...");

                final SystemExport sysexport = new SystemExport(broker, logCallback, monitor, false);
                lastExportedBackup = sysexport.export(exportDir, incremental, maxInc, createZip, errors);
                agentInstance.changeStatus(brokerPool, new TaskStatus(TaskStatus.Status.RUNNING_BACKUP));

                if (lastExportedBackup != null) {
                    LOG.info("Created backup to file: " + lastExportedBackup.getAbsolutePath());
                }
               
View Full Code Here

        } finally {
            if (report != null) {
                report.close();
            }
           
            agentInstance.changeStatus(brokerPool, endStatus);
            brokerPool.getProcessMonitor().endJob();
        }
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.