Package java.util

Examples of java.util.Timer.purge()


        // remove references to timer tasks cancelled above to make them
        // eligible for garbage collection
        Timer t = getTimer(false);
        if (t != null) {
            t.purge();
            t.cancel();
        }

        // unregistring of this managed bean from the server is done by the bus itself
    }
View Full Code Here


       
        // remove references to timer tasks cancelled above to make them
        // eligible for garbage collection
        Timer t = getTimer(false);
        if (t != null) {
            t.purge();
        }
       
        reliableEndpoints.remove(e);
    }
   
View Full Code Here

    final Timer timer = new Timer();
    timer.schedule(new TimerTask() {
      public void run()
      {
        timer.cancel();
        timer.purge();
        System.out.println(">>>> Stopping UIMA EE Engine");
        uimaEEEngine.stop();
        isStopped = true;
        System.out.println(">>>> UIMA EE Engine Stopped");
        if (cpcLatch != null )
View Full Code Here

        // remove references to timer tasks cancelled above to make them
        // eligible for garbage collection
        Timer t = getTimer(false);
        if (t != null) {
            t.purge();
            t.cancel();
        }
    }
   
    synchronized void shutdownReliableEndpoint(Endpoint e) {
View Full Code Here

       
        // remove references to timer tasks cancelled above to make them
        // eligible for garbage collection
        Timer t = getTimer(false);
        if (t != null) {
            t.purge();
        }
       
        reliableEndpoints.remove(e);
    }
   
View Full Code Here

                    }
                    catch (NoSuchMethodException e) { // try the old way
                        Field cancelTimerField = driverClass.getDeclaredField("cancelTimer");
                        cancelTimerField.setAccessible(true);
                        final Timer cancelTimer = (Timer) cancelTimerField.get(null);
                        cancelTimer.purge();
                    }
                    log.info("PostgreSQL driver cancel timer has been purged");
                }
            }
            catch (NoSuchFieldException e) {
View Full Code Here

    public void run()
    {
        Timer timer = _timer;
        if (timer != null)
        {
            timer.purge();
            schedule(this, 1, TimeUnit.SECONDS);
        }
    }

    private static class SimpleTask extends TimerTask implements Task
View Full Code Here

        // remove references to timer tasks cancelled above to make them
        // eligible for garbage collection
        Timer t = getTimer(false);
        if (t != null) {
            t.purge();
            t.cancel();
        }
    }
   
    synchronized void shutdownReliableEndpoint(Endpoint e) {
View Full Code Here

       
        // remove references to timer tasks cancelled above to make them
        // eligible for garbage collection
        Timer t = getTimer(false);
        if (t != null) {
            t.purge();
        }
       
        reliableEndpoints.remove(e);
    }
   
View Full Code Here

     */
    public void test_purge() throws Exception {
        Timer t = null;
        try {
            t = new Timer();
            assertEquals(0, t.purge());

            TimerTestTask[] tasks = new TimerTestTask[100];
            int[] delayTime = { 50, 80, 20, 70, 40, 10, 90, 30, 60 };

            int j = 0;
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.