Package org.exist.storage

Examples of org.exist.storage.SystemTask


    @Override
    public final void execute(final JobExecutionContext jec) throws JobExecutionException {
        final JobDataMap jobDataMap = jec.getJobDetail().getJobDataMap();
        final BrokerPool pool = (BrokerPool)jobDataMap.get("brokerpool");
        final SystemTask task = ( SystemTask )jobDataMap.get("systemtask");

        //if invalid arguments then abort
        if((pool == null) || (task == null)) {

            //abort all triggers for this job
View Full Code Here


                try {
                    final Class<?> jobClass = Class.forName(jobConfig.getResourceName());
                    final Object jobObject = jobClass.newInstance();
                    if(jobConfig.getType().equals(JobType.SYSTEM)) {
                        if(jobObject instanceof SystemTask) {
                            final SystemTask task = (SystemTask)jobObject;
                            task.configure(config, jobConfig.getParameters());
                            job = new SystemTaskJobImpl(jobConfig.getJobName(), task);
                        } else {
                            LOG.error("System jobs must extend SystemTask");
                            // throw exception? will be handled nicely
                        }
View Full Code Here

    @Override
    public void triggerCheck(String output, String backup, String incremental) {
        try {
            this.output = output;
            final SystemTask task = new ConsistencyCheckTask();
            final Properties properties = parseParameter(output, backup, incremental);
            task.configure(pool.getConfiguration(), properties);
            pool.triggerSystemTask(task);

        } catch (final EXistException existException) {
            taskstatus.setStatus(TaskStatus.Status.STOPPED_ERROR);
View Full Code Here

                final XPathException xPathException = new XPathException(this, className + " is not an instance of org.exist.storage.SystemTask");
                logger.error("Java classname is not a SystemTask", xPathException);
        throw xPathException;
            }

            final SystemTask task = (SystemTask) taskObject;
            task.configure(context.getBroker().getConfiguration(), properties);
            LOG.info("Triggering SystemTask: " + className);
            context.getBroker().getBrokerPool().triggerSystemTask(task);

        } catch (final ClassNotFoundException e) {
            final String message = "system task class '" + className + "' not found";
View Full Code Here

TOP

Related Classes of org.exist.storage.SystemTask

Copyright © 2018 www.massapicom. 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.