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();
        }
       
        reliableEndpoints.remove(e);
    }
   
View Full Code Here


    Date timeToRun = new Date(System.currentTimeMillis() + when);
    final Timer timer = new Timer();
    timer.schedule(new TimerTask() {
      public void run() {
        timer.cancel();
        timer.purge();
        if (aSpringContainerIds == null) {
          isStopping = true;
          System.out.println(">>>> runTest: Stopping UIMA EE Engine");
          uimaEEEngine.stop();
          isStopping = false;
View Full Code Here

      progressTask.log();
    } finally {
      readSession.close();
      writeSession.close();
      timer.cancel();
      timer.purge();
    }
  }

  private void migrateEnabledComponents(DbSession readSession, DbSession writeSession, Component project, Map<Long, String> uuidByComponentId) {
    Map<Long, Component> componentsBySnapshotId = newHashMap();
View Full Code Here

      LOGGER.info("Inserted {} Issues in {} ms with avg {} Issue/second", ISSUE_COUNT, totalTime, documentPerSecond(ISSUE_COUNT, totalTime));
      // assertDurationAround(totalTime, Long.parseLong(getProperty("IssuesIndexInjectionTest.inject_issues")));

    } finally {
      timer.cancel();
      timer.purge();
    }
  }

  public void executeQueries() {
    long start = System.currentTimeMillis();
View Full Code Here

      LOGGER.info("Extracted {} Issues in {} ms with avg {} Issue/second", ISSUE_COUNT, time, documentPerSecond(time));
      // assertDurationAround(time, Long.parseLong(getProperty("IssuesDbExtractionTest.extract_issues")));

    } finally {
      timer.cancel();
      timer.purge();
    }
  }

  private void generateData() {
    long start = System.currentTimeMillis();
View Full Code Here

      progressTask.log();
    } finally {
      session.close();

      timer.cancel();
      timer.purge();
    }
  }

  private void insertCustomRuleParameterIfNotAlreadyExisting(RuleParameter templateRuleParam, Integer templateRuleId,
    Multimap<Integer, Integer> customRuleIdsByTemplateRuleId,
View Full Code Here

      // log the total number of process rows
      progressTask.log();
    } finally {
      timer.cancel();
      timer.purge();
    }
  }

  public static class ProgressTask extends TimerTask {
    private static final Logger LOGGER = LoggerFactory.getLogger("DbMigration");
View Full Code Here

    } catch (Exception e) {
      throw new IllegalStateException("Fail to start migration threads", e);
    } finally {
      progress.cancel();
      timer.cancel();
      timer.purge();
    }
  }

  int numberOfThreads() {
    int threads = settings.getInt(THREADS_PROPERTY);
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();
        }

        // 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();
        }
       
        for (ProtocolVariation protocol : ProtocolVariation.values()) {
            endpointMaps.get(protocol).remove(e);
        }
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.