Examples of Stop


Examples of org.apache.niolex.commons.test.StopWatch.Stop

    public static void main(String[] args) {
        StopWatch w = new StopWatch(1);
        w.begin(true);
        for (int i = 0; i < 1000; ++i) {
            Map<Integer, Boolean> map = Maps.newHashMap();
            Stop s = w.start();
            for (int j = 0; j < 10000; ++j) {
                map.put(j, j % 2 == 0);
            }
            for (int j = 0; j < 10000; ++j) {
                Check.isTrue(map.get(j).booleanValue() == (j % 2 == 0));
            }
            s.stop();
        }
        w.done();
        w.print();
        // --
        w.begin(true);
        for (int i = 0; i < 1000; ++i) {
            TIntCharMap primary = new TIntCharHashMap();
            Stop s = w.start();
            for (int j = 0; j < 10000; ++j) {
                primary.put(j, (char)((j % 2) + '0'));
            }
            for (int j = 0; j < 10000; ++j) {
                Check.isTrue(primary.get(j) == (char)((j % 2) + '0'));
            }
            s.stop();
        }
        w.done();
        w.print();
        // --
        w.begin(true);
        for (int i = 0; i < 1000; ++i) {
            Int2CharMap int2c = new Int2CharOpenHashMap();
            Stop s = w.start();
            for (int j = 0; j < 10000; ++j) {
                int2c.put(j, (char)((j % 2) + '0'));
            }
            for (int j = 0; j < 10000; ++j) {
                Check.isTrue(int2c.get(j) == (char)((j % 2) + '0'));
            }
            s.stop();
        }
        w.done();
        w.print();
    }
View Full Code Here

Examples of org.exist.debuggee.dbgp.packets.Stop

  @Override
  public void update(Observable o, Object arg) {
    if (arg.equals(BrokerPool.SIGNAL_SHUTDOWN)) {

      Stop command = new Stop(session, "");
      command.exec();
      //TODO: make sure that session is closed? what can be done if not?
    }
   
  }
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Stop

        imageProvider.addIconsForClass(new SetHeader());
        imageProvider.addIconsForClass(new SetOutHeader());
        imageProvider.addIconsForClass(new SetProperty());
        imageProvider.addIconsForClass(new Sort());
        imageProvider.addIconsForClass(new Split());
        imageProvider.addIconsForClass(new Stop());
        imageProvider.addIconsForClass(new Threads());
        imageProvider.addIconsForClass(new Throttle());
        imageProvider.addIconsForClass(new ThrowException());
        imageProvider.addIconsForClass(new Transacted());
        imageProvider.addIconsForClass(new Transform());
View Full Code Here

Examples of org.gradle.launcher.daemon.protocol.Stop

        //iterate and stop all daemons
        while (connection != null && System.currentTimeMillis() < expiry) {
            try {
                if (stopped.add(connection.getDaemon().getUid())) {
                    LOGGER.debug("Requesting daemon {} stop now", connection.getDaemon());
                    stopDispatcher.dispatch(connection, new Stop(idGenerator.generateId()));
                    LOGGER.lifecycle("Gradle daemon stopped.");
                }
            } finally {
                connection.stop();
            }
View Full Code Here

Examples of org.gradle.launcher.protocol.Stop

        Connection<Object> connection = connector.maybeConnect();
        if (connection == null) {
            LOGGER.lifecycle("Gradle daemon is not running.");
            return;
        }
        run(new Stop(clientMetaData), connection, executionListener);
        LOGGER.lifecycle("Gradle daemon stopped.");
    }
View Full Code Here

Examples of org.infinispan.factories.annotations.Stop

      if (stopMethods != null && !stopMethods.isEmpty()) {
         this.stopMethods = new PrioritizedMethodMetadata[stopMethods.size()];
         int i=0;
         for (Method m : stopMethods) {
            Stop s = m.getAnnotation(Stop.class);
            this.stopMethods[i++] = new PrioritizedMethodMetadata(m.getName(), s.priority());
         }
      }

      if (injectMethods != null && !injectMethods.isEmpty()) {
         this.injectMetadata = new InjectMetadata[injectMethods.size()];
View Full Code Here

Examples of org.infinispan.factories.annotations.Stop

      if (stopMethods != null && !stopMethods.isEmpty()) {
         this.stopMethods = new PrioritizedMethodMetadata[stopMethods.size()];
         int i=0;
         for (Method m : stopMethods) {
            Stop s = m.getAnnotation(Stop.class);
            this.stopMethods[i++] = new PrioritizedMethodMetadata(m.getName(), s.priority());
         }
      }

      if (injectMethods != null && !injectMethods.isEmpty()) {
         this.injectMetadata = new InjectMetadata[injectMethods.size()];
View Full Code Here

Examples of org.jberet.job.Stop

                    if (!oldVal.equals(newVal)) {
                        end.setExitStatus(newVal);
                    }
                }
            } else if (e instanceof Stop) {
                Stop stop = (Stop) e;
                oldVal = stop.getOn();
                newVal = resolve(oldVal);
                if (!oldVal.equals(newVal)) {
                    stop.setOn(newVal);
                }
                oldVal = stop.getExitStatus();
                if (oldVal != null) {
                    newVal = resolve(oldVal);
                    if (!oldVal.equals(newVal)) {
                        stop.setExitStatus(newVal);
                    }
                }
                oldVal = stop.getRestart();
                if (oldVal != null) {
                    newVal = resolve(oldVal);
                    if (!oldVal.equals(newVal)) {
                        stop.setRestart(newVal);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.jberet.job.model.Transition.Stop

                    if (!oldVal.equals(newVal)) {
                        end.setExitStatus(newVal);
                    }
                }
            } else if (e instanceof Stop) {
                final Stop stop = (Stop) e;
                oldVal = stop.getOn();
                newVal = resolve(oldVal);
                if (!oldVal.equals(newVal)) {
                    stop.setOn(newVal);
                }
                oldVal = stop.getExitStatus();
                if (oldVal != null) {
                    newVal = resolve(oldVal);
                    if (!oldVal.equals(newVal)) {
                        stop.setExitStatus(newVal);
                    }
                }
                oldVal = stop.getRestart();
                if (oldVal != null) {
                    newVal = resolve(oldVal);
                    if (!oldVal.equals(newVal)) {
                        stop.setRestart(newVal);
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.jberet.job.model.Transition.Stop

                    setOuterContextStatus(batchContext.getOuterContexts(), BatchStatus.FAILED,
                            exitStatus, fail.getExitStatus(), partOfDecision);
                    return null;
                }
            } else //stop
                final Stop stop = (Stop) e;
                if (matches(exitStatus, stop.getOn())) {
                    setOuterContextStatus(batchContext.getOuterContexts(), BatchStatus.STOPPED,
                            exitStatus, stop.getExitStatus(), partOfDecision);
                    final String restartPoint = stop.getRestart()//job-level step, flow or split to restart
                    if (restartPoint != null) {
                        batchContext.getJobContext().getJobExecution().setRestartPosition(restartPoint);
                    }
                    return null;
                }
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.