Package org.apache.sling.event.jobs

Examples of org.apache.sling.event.jobs.Queue.resume()


                properties.clear();
                properties.put("counter", i);
                jobManager.addJob(subTopic, properties);
            }
            // start the queue
            q.resume();
            while ( count.get() < NUM_JOBS +1 ) {
                try {
                    Thread.sleep(500);
                } catch (InterruptedException ie) {
                    // ignore
View Full Code Here


            for(int i = 0; i < NUM_JOBS; i++ ) {
                final String subTopic = TOPIC + "/sub" + (i % 10);
                jobManager.addJob(subTopic, "id" + i, null);
            }
            // start the queue
            q.resume();
            while ( count.get() < 2 * NUM_JOBS  + 1 ) {
                assertEquals("Failed count", 0, q.getStatistics().getNumberOfFailedJobs());
                assertEquals("Cancelled count", 0, q.getStatistics().getNumberOfCancelledJobs());
                sleep(500);
            }
View Full Code Here

                msg = this.getQueueErrorMessage(req, "suspend");
            }
        } else if ( "resume".equals(cmd) ) {
            final Queue q = this.getQueue(req);
            if ( q != null ) {
                q.resume();
            } else {
                msg = this.getQueueErrorMessage(req, "resume");
            }
        } else if ( "clear".equals(cmd) ) {
            final Queue q = this.getQueue(req);
View Full Code Here

     */
    @Override
    public void wakeUpJobQueue(final String jobQueueName) {
        final Queue q = this.jobManager.getQueue(jobQueueName);
        if ( q != null ) {
            q.resume();
        }
    }

    /**
     * @see org.apache.sling.event.JobStatusProvider#queryAllJobs(String, Map...)
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.