Package java.util

Examples of java.util.TimerTask.cancel()


        TimerTask task = (TimerTask) dgcAckTable.get(uid);

        if (task == null) {
            return;
        }
        task.cancel();
        dgcAckTable.remove(uid);
    }

    /*
     * Returns next sequence number
View Full Code Here


                calledMethods.clear();
                final ObjectPool pool = (ObjectPool)createProxy(ObjectPool.class, calledMethods);
                final TimerTask task = PoolUtils.checkMinIdle(pool, 1, CHECK_PERIOD); // checks minIdle immediately

                Thread.sleep(CHECK_SLEEP_PERIOD); // will check CHECK_COUNT more times.
                task.cancel();
                task.toString();

                final List expectedMethods = new ArrayList();
                for (int i=0; i < CHECK_COUNT; i++) {
                    expectedMethods.add("getNumIdle");
View Full Code Here

                calledMethods.clear();
                final KeyedObjectPool pool = (KeyedObjectPool)createProxy(KeyedObjectPool.class, calledMethods);
                final TimerTask task = PoolUtils.checkMinIdle(pool, key, 1, CHECK_PERIOD); // checks minIdle immediately

                Thread.sleep(CHECK_SLEEP_PERIOD); // will check CHECK_COUNT more times.
                task.cancel();
                task.toString();

                final List expectedMethods = new ArrayList();
                for (int i=0; i < CHECK_COUNT; i++) {
                    expectedMethods.add("getNumIdle");
View Full Code Here

                Thread.sleep(CHECK_SLEEP_PERIOD); // will check CHECK_COUNT more times.
                final Iterator iter = tasks.values().iterator();
                while (iter.hasNext()) {
                    final TimerTask task = (TimerTask)iter.next();
                    task.cancel();
                }

                final List expectedMethods = new ArrayList();
                for (int i=0; i < CHECK_COUNT * keys.size(); i++) {
                    expectedMethods.add("getNumIdle");
View Full Code Here

                Thread.sleep(1000);
            }
        }

        // Stop the timer, server should be up now
        timeoutTask.cancel();

        log.info("Geronimo server started in " + watch);

        if (!background) {
            log.info("Waiting for Geronimo server to shutdown...");
View Full Code Here

              }
            }
          };
          timerToDetectLongRunningAutomata.schedule(recordPta,1000l*60l*20l);
          actualAutomaton = learnerOfPairs.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
          recordPta.cancel();
        }
       
        VertID rejectVertexID = null;
        for(CmpVertex v:actualAutomaton.transitionMatrix.keySet())
          if (!v.isAccept())
View Full Code Here

              }
            }
          };
          timerToDetectLongRunningAutomata.schedule(recordPta,1000l*60l*20l);
          actualAutomaton = learnerOfPairs.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
          recordPta.cancel();
        }
       
        VertID rejectVertexID = null;
        for(CmpVertex v:actualAutomaton.transitionMatrix.keySet())
          if (!v.isAccept())
View Full Code Here

              }
            }
          };
          timerToDetectLongRunningAutomata.schedule(recordPta,1000l*60l*20l);
          actualAutomaton = learnerOfPairs.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
          recordPta.cancel();
        }
       
        VertID rejectVertexID = null;
        for(CmpVertex v:actualAutomaton.transitionMatrix.keySet())
          if (!v.isAccept())
View Full Code Here

              }
            }
          };
          timerToDetectLongRunningAutomata.schedule(recordPta,1000l*60l*20l);
          actualAutomaton = learnerOfPairs.learnMachine(new LinkedList<List<Label>>(),new LinkedList<List<Label>>());
          recordPta.cancel();
        }
       
        VertID rejectVertexID = null;
        for(CmpVertex v:actualAutomaton.transitionMatrix.keySet())
          if (!v.isAccept())
View Full Code Here

        ConversationContext context = null;
        if (conversationContexts != null) {
            context = conversationContexts.remove(conversationId);
            TimerTask task = context.getTimerTask();
            if (task != null) {
                task.cancel();
            }
        }

        return context;
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.