Package java.util

Examples of java.util.TimerTask.run()


        assertTrue("expect the new Timestamp in the persistence object",
                   persistedFileTS.longValue() > createdFileTS);

        // Delete the file and check it is noticed - should run the timertask once
        addFile.delete();
        scanner.run();
        Thread.sleep(500);
        assertFalse(rootTSP.getTimestamps().isEmpty());
        assertTrue("expect the added directory in the Timestamp persistence",
                   rootTSP.getTimestamps().containsKey(testDir));
        assertFalse("expect the added file in the Timestamp persistence",
View Full Code Here


                   nestedTSP.getTimestamps().containsKey(testFile));

        // Delete the nested directory, and check it gets noticed.
        addDir.delete();
        // should run the timertask once
        scanner.run();
        Thread.sleep(500);
        assertTrue("timestamps should be empty", rootTSP.getTimestamps().isEmpty());
    }

    public void testUnregisterBundle() throws Exception {
View Full Code Here

            // start the new one
            monitor = new URLMonitorTask();
            TimerTask task = monitor;
            timer.schedule(monitor, 1000 * refreshPeriod, 1000 * refreshPeriod);
            task.run();
        }
    }

    public synchronized void start() {
        reconfigure();
View Full Code Here

            // start the new one
            monitor = new URLMonitorTask();
            TimerTask task = monitor;
            timer.schedule(monitor, 1000 * refreshPeriod, 1000 * refreshPeriod);
            task.run();
        }
    }

    public void doStart() {
        LogFactory logFactory = LogFactory.getFactory();
View Full Code Here

            // start the new one
            monitor = new URLMonitorTask();
            TimerTask task = monitor;
            timer.schedule(monitor, 1000 * refreshPeriod, 1000 * refreshPeriod);
            task.run();
        }
    }

    public void doStart() {
        LogFactory logFactory = LogFactory.getFactory();
View Full Code Here

            // start the new one
            monitor = new URLMonitorTask();
            TimerTask task = monitor;
            timer.schedule(monitor, 1000 * refreshPeriod, 1000 * refreshPeriod);
            task.run();
        }
    }

    public void doStart() {
        LogFactory logFactory = LogFactory.getFactory();
View Full Code Here

    try {
      timerFactoryBean.setScheduledTimerTasks(tasks);
      timerFactoryBean.afterPropertiesSet();
      assertTrue(timerFactoryBean.getObject() instanceof Timer);
      timerTask0.run();
      timerTask1.run();
      timerTask2.run();
    }
    finally {
      timerFactoryBean.destroy();
    }
View Full Code Here

            // start the new one
            monitor = new URLMonitorTask();
            TimerTask task = monitor;
            timer.schedule(monitor, 1000 * refreshPeriod, 1000 * refreshPeriod);
            task.run();
        }
    }

    public void doStart() {
        LogFactory logFactory = LogFactory.getFactory();
View Full Code Here

            // start the new one
            monitor = new URLMonitorTask();
            TimerTask task = monitor;
            timer.schedule(monitor, 1000 * refreshPeriod, 1000 * refreshPeriod);
            task.run();
        }
    }

    public void doStart() {
        LogFactory logFactory = LogFactory.getFactory();
View Full Code Here

                if (i > 0 && i%600 == 0) {
                    LOG.info("Commit on %5");
                //    session.commit();
                }
            }
            restartTask.run();
        }

    }

    // no need to run this unless there are some issues with the others
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.