Package org.apache.roller.business.runnable

Examples of org.apache.roller.business.runnable.ThreadManager.acquireLock()


           
            if(!mgr.isLocked(this)) {
               
                log.debug("Attempting to acquire lock");
               
                lockAcquired = mgr.acquireLock(this);
               
                // now if we have a lock then run the task
                if(lockAcquired) {
                    log.debug("Lock acquired, running task");
                    this.runTask();
View Full Code Here


       
        // need a test task to play with
        RollerTask task = new TestTask();
       
        // try to acquire a lock
        boolean lockAcquired = mgr.acquireLock(task);
        assertTrue(lockAcquired);
        TestUtils.endSession(true);
       
        // make sure task is locked
        boolean stillLocked = mgr.isLocked(task);
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.