Package java.util

Examples of java.util.Timer.cancel()


     
      int individualID = userObject.getIndividualID();    // logged in user
      Timer userTimer = siteInfo.getUserTimer(individualID);
      if (userTimer != null)
      {
        userTimer.cancel();
      }
      if (session != null)
      {
        session.invalidate();
      }
View Full Code Here


         
          // make sure this job isn't already scheduled for some unknown reason...
          // .. by "make sure", I mean blindly cancel the job registered for this user.
          Timer currentTimer = siteInfo.getUserTimer(individualId);
          if (currentTimer != null) {
            currentTimer.cancel();
          }

          TimerTask currentTask = siteInfo.getUserTask(individualId);
          if (currentTask != null) {
            currentTask.cancel();
View Full Code Here

                execute(reader);
            } catch (XQueryException e) {
                timer.cancel();
                throw e;
            }
            timer.cancel();
        } else {
            execute(reader);
        }
        if(_timing) {
            if(_timing_in_msec) {
View Full Code Here

      SiteInfo siteInfo = Settings.getInstance().getSiteInfo(host);
      Timer currentTimer = siteInfo.getUserTimer(this.individualId);
      if (currentTimer != null)
      {
        logger.debug("[run] Calling cancel on the timer.");
        currentTimer.cancel();
      }
    }
  }   // end run() method
}   // end class definition
View Full Code Here

        // cancel the existing timer.
        if (supportEmailTask != null) {
          supportEmailTask.cancel();
        }
        if (supportEmailTimer != null) {
          supportEmailTimer.cancel();
        }
        // only re-schedule the job if the interval is greater than zero
        // a zero value means do not check support email ever
        if (formInterval.intValue() > 0) {
          // minutes to seconds, seconds to miliseconds
View Full Code Here

    timer.schedule(new TimerTask() {
      @Override
      public void run() {
        Object name = cacheProvider.get("name");
        if (name == null)
          timer.cancel();
        else
          System.out.println(name + "   " + (++index));
      }
    }, 0, 1000);
  }
View Full Code Here

            throw new RuntimeException( e );
        }
        finally
        {
            // kill our ThreadPool monitors if existent
            if ( timer != null ) timer.cancel();

            try
            {
                // shutdown the Read-Process-ThreadPool if existent
                if ( this._readpool != null )
View Full Code Here

                   log.error("Failed to destroy process " + processInfo);
               }
           } catch (InterruptedException e) {
               log.error("Timeout waiting for process " + processInfo + " to exit");
            } finally {
                t.cancel();
            }
       }
   }
}
View Full Code Here

            if (counter != null && counter.decrementAndGet() <= 0) {
                refCounts.remove(key);
                // remove timer as its no longer in use
                Timer timer = timers.remove(key);
                if (timer != null) {
                    timer.cancel();
                }
            }
        }
    }
View Full Code Here

                hashSeed++; // will wrap around if a hashSeedHint was provided
            }

        } finally {
            if (timer != null) {
                timer.cancel();
            }
        }

        return oam;
    }
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.