Package org.apache.openjpa.datacache

Examples of org.apache.openjpa.datacache.DataCacheScheduler.stop()


        Thread thread = new Thread(scheduler);
        thread.setDaemon(true);
        thread.start();
        // test that it did not run yet...
        Thread.currentThread().sleep(70 * 1000); // 70 seconds
        scheduler.stop();
//        assertEquals(2, validCache.clearCount);
        assertTrue("Wrong invocation count: " + validCache.clearCount,
            validCache.clearCount == 1 || validCache.clearCount == 2);
        assertEquals(0, invalidCache.clearCount);
    }
View Full Code Here


        Thread thread = new Thread(scheduler);
        thread.setDaemon(true);
        thread.start();
        // test that it did not run yet...
        Thread.currentThread().sleep(70 * 1000); // 70 seconds
        scheduler.stop();
//        assertEquals(2, validCache.clearCount);
        assertTrue("Wrong invocation count: " + validCache.clearCount,
            validCache.clearCount == 1 || validCache.clearCount == 2);
        assertEquals(0, invalidCache.clearCount);
    }
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.