Examples of TimerTask


Examples of com.caucho.config.timer.TimerTask

   * @return The newly created Timer.
   */
  private Timer createTimer(Trigger trigger, Serializable info)
  {
    EjbTimer timer = new EjbTimer();
    TimerTask scheduledTask
      = new TimerTask(_timeout, timer, null, trigger, info);
    timer.setScheduledTask(scheduledTask);

    synchronized (_timers) {
      _timers.add(scheduledTask);
    }

    scheduledTask.start();

    return timer;
  }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.util.TimerTask

                        if (ctx.getAttachment() == null) {
                            // readSuspended = true;
                            ctx.setAttachment(Boolean.TRUE);
                            channel.setReadable(false);
                            // logger.warn("Read will wakeup after "+wait+" ms "+this);
                            TimerTask timerTask = new ReopenReadTimerTask(ctx);
                            timeout = timer.newTimeout(timerTask, wait,
                                    TimeUnit.MILLISECONDS);
                        } else {
                            // should be waiting: but can occurs sometime so as
                            // a FIX
View Full Code Here

Examples of com.google.gwt.maeglin89273.game.mengine.timer.TimerTask

   * @param a
   */
  public ShapesFountain(Creator creator,Point p,double a,float impulseMag) {
    super(creator, p,a);
    impulse=new Vec2((float)(impulseMag*Math.cos(-a)),(float)(impulseMag*Math.sin(-a)));
    timer=new RepeatingTimer(new TimerTask(){

      @Override
      public void doTask() {
       
        PhysicalShape shape;
View Full Code Here

Examples of com.taobao.gecko.service.timer.TimerTask

            return;
        }
        if (seconds > this.metaConfig.getMaxTxTimeoutInSeconds()) {
            seconds = this.metaConfig.getMaxTxTimeoutInSeconds();
        }
        tx.setTimeoutRef(this.txTimeoutTimer.newTimeout(new TimerTask() {

            @Override
            public void run(final Timeout timeout) throws Exception {
                // û��prepared�ĵ�������Ҫ�ع�
                // ��Ҫ��XATransaction.prepare��ͬ������
View Full Code Here

Examples of io.netty.util.TimerTask

    private <V, T> void writeAllAsync(final int slot, final AsyncOperation<V, T> asyncOperation, final AtomicInteger counter, final Promise<T> mainPromise, final int attempt) {
        final Promise<T> promise = getGroup().next().newPromise();
        final AtomicReference<RedisException> ex = new AtomicReference<RedisException>();

        TimerTask timerTask = new TimerTask() {
            @Override
            public void run(Timeout timeout) throws Exception {
                if (promise.isDone()) {
                    return;
                }
View Full Code Here

Examples of java.util.TimerTask

    this.adminSecurityDomains.add(domain);
    LogManager.logInfo(LogConstants.CTX_SECURITY, "Admin Security Enabled: true"); //$NON-NLS-1$
  }

  public void start() {
        this.sessionMonitor.schedule(new TimerTask() {
          @Override
          public void run() {
            monitorSessions();
          }
        }, 0, ServerConnection.PING_INTERVAL * 5);
 
View Full Code Here

Examples of java.util.TimerTask

  protected void startTimer() {
    if (mRefreshListTimer != null) {
      mRefreshListTimer.cancel();
    }
    mRefreshListTimer = new Timer("Refresh channel list");
    mRefreshListTimer.schedule(new TimerTask() {
      public void run() {
        if (!mListUpdating) {
          mListUpdating = true;
          fillAvailableChannelsListBox();
          mListUpdating = false;
View Full Code Here

Examples of java.util.TimerTask

  public void stopEndPoints () {
    stopEndPoints(0);
  }

  public void stopEndPoints (int stopAfterMillis) {
    timer.schedule(new TimerTask() {
      public void run () {
        for (EndPoint endPoint : endPoints)
          endPoint.stop();
        endPoints.clear();
      }
View Full Code Here

Examples of java.util.TimerTask

    waitForThreads();
  }

  public void waitForThreads () {
    fail = false;
    TimerTask failTask = new TimerTask() {
      public void run () {
        stopEndPoints();
        fail = true;
      }
    };
    timer.schedule(failTask, 11000);
    while (true) {
      for (Iterator iter = threads.iterator(); iter.hasNext();) {
        Thread thread = (Thread)iter.next();
        if (!thread.isAlive()) iter.remove();
      }
      if (threads.isEmpty()) break;
      try {
        Thread.sleep(100);
      } catch (InterruptedException ignored) {
      }
    }
    failTask.cancel();
    if (fail) fail("Test did not complete in a timely manner.");
    // Give sockets a chance to close before starting the next test.
    try {
      Thread.sleep(1000);
    } catch (InterruptedException ignored) {
View Full Code Here

Examples of java.util.TimerTask

          Timer currentTimer = siteInfo.getUserTimer(individualId);
          if (currentTimer != null) {
            currentTimer.cancel();
          }

          TimerTask currentTask = siteInfo.getUserTask(individualId);
          if (currentTask != null) {
            currentTask.cancel();
          }

          Timer newTimer = new Timer(true);
          TimerTask userEmailCheck = new UserEmailCheck(individualId, session, dataSource, host);
          newTimer.schedule(userEmailCheck, 300000L, interval.longValue());
          siteInfo.setUserTimer(individualId, newTimer, userEmailCheck);
        }

        // code added for concurrent user maintinance
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.