Examples of Duration


Examples of akka.util.Duration

        Result result = (Result) message;
        pi += result.getValue();
        nrOfResults += 1;
        if (nrOfResults == nrOfMessages) {
          // Send the result to the listener
          Duration duration = Duration.create(
              System.currentTimeMillis() - start,
              TimeUnit.MILLISECONDS);
          listener.tell(new PiApproximation(pi, duration), getSelf());
          // Stops this actor and all its supervised children
          getContext().stop(getSelf());
View Full Code Here

Examples of brooklyn.util.time.Duration

            setAttribute(DOCKER_IMAGE_NAME, imageName);
        }

        setAttribute(DOCKER_IMAGE_ID, imageId);

        Duration interval = getConfig(SCAN_INTERVAL);
        scan = FunctionFeed.builder()
                .entity(this)
                .poll(new FunctionPollConfig<Object, Void>(SCAN)
                        .period(interval)
                        .description("Scan Containers")
View Full Code Here

Examples of ch.qos.logback.core.util.Duration

      ReconfigureOnChangeFilter rocf = new ReconfigureOnChangeFilter();
      rocf.setContext(context);
      String scanPeriodAttrib = ic.subst(attributes.getValue(SCAN_PERIOD_ATTR));
      if (!OptionHelper.isEmpty(scanPeriodAttrib)) {
        try {
          Duration duration = Duration.valueOf(scanPeriodAttrib);
          rocf.setRefreshPeriod(duration.getMilliseconds());
          addInfo("Setting ReconfigureOnChangeFilter scanning period to "
                  + duration);
        } catch (NumberFormatException nfe) {
          addError("Error while converting [" + scanAttrib + "] to long", nfe);
        }
View Full Code Here

Examples of com.art.anette.datamodel.dataobjects.simple.Duration

     * Setzt den Endzeitpunkt der Duration d
     *
     * @param d
     */
    public void finalizeDuration(DurationData d) {
        Duration duration = ((ClientDBControl) taskModel.object.getDBControl()).createDuration(d);
        duration.getDBControl().synchronize();
    }
View Full Code Here

Examples of com.collective2.signalEntry.Duration

        String symbol = "GG";
        SignalAction action = SignalAction.BTO;
        Integer quantity = 10;
        QuantityComputable quantityComputable = new QuantityComputableFixed(quantity);
        long cancelAtMs = Long.MAX_VALUE;
        Duration timeInForce = Duration.GoodTilCancel;
        OrderProcessorMarket processor = new OrderProcessorMarket(time, symbol);
        Order order = new Order(null, id,instrument,symbol,action,quantityComputable,cancelAtMs,timeInForce,processor, null);

        //test only the processor and do it outside the order
        boolean processed = processor.process(dataProvider, portfolio, commission, order, action, quantityComputable, null);
View Full Code Here

Examples of com.cychop.til.duration.Duration

      // reading page
      while (reader.ready()) {
        fileLine = reader.readLine();
        if (!"".equals(fileLine)) {
          Duration howLong = Duration.fromCita(fileLine);
          if (howLong != null) {
            returnList.add(new InstantDuration(howLong));
            log.fine("Read: " + howLong.toString());
          }
        }
      }

    } catch (ConnectException ce) {
View Full Code Here

Examples of com.dianping.cat.consumer.problem.model.entity.Duration

  }

  protected void visitEntryChildren(Entry to, Entry from) {
    Stack<Object> objs = getObjects();
    for (Duration source : from.getDurations().values()) {
      Duration target = to.findDuration(source.getValue());

      if (target == null) {
        target = new Duration(source.getValue());
        to.addDuration(target);
      }

      objs.push(target);
      source.accept(this);
View Full Code Here

Examples of com.dianping.cat.consumer.transaction.model.entity.Duration

    while (dk < d) {
      dk <<= 1;
    }

    Duration duration = name.findOrCreateDuration(dk);
    Range range = name.findOrCreateRange(min);

    duration.incCount();
    range.incCount();

    if (!t.isSuccess()) {
      range.incFails();
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.airlift.units.Duration

        checkNotNull(queryResultsCodec, "queryResultsCodec is null");

        this.queryInfoCodec = queryResultsCodec;
        this.httpClient = new JettyHttpClient(
                new HttpClientConfig()
                        .setConnectTimeout(new Duration(10, TimeUnit.SECONDS))
                        .setSocksProxy(socksProxy),
                ImmutableSet.of(new UserAgentRequestFilter(userAgent)));
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.joda.time.Duration

    public Duration deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws
        IOException, JsonProcessingException
    {
        switch (jsonParser.getCurrentToken()) {
        case VALUE_NUMBER_INT: // assume it's millisecond count
            return new Duration(jsonParser.getLongValue());
        case VALUE_STRING:
            return new Duration(jsonParser.getText());
        }
        throw deserializationContext.mappingException("expected JSON Number or String");
    }
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.