Examples of toStandardDuration()


Examples of org.joda.time.Period.toStandardDuration()

  {
    final Granularity segmentGranularity = schema.getGranularitySpec().getSegmentGranularity();
    final Period windowPeriod = config.getWindowPeriod();

    final DateTime truncatedNow = segmentGranularity.truncate(new DateTime());
    final long windowMillis = windowPeriod.toStandardDuration().getMillis();

    log.info(
        "Expect to run at [%s]",
        new DateTime().plus(
            new Duration(
View Full Code Here

Examples of org.joda.time.Period.toStandardDuration()

  private void mergeAndPush()
  {
    final Granularity segmentGranularity = schema.getGranularitySpec().getSegmentGranularity();
    final Period windowPeriod = config.getWindowPeriod();

    final long windowMillis = windowPeriod.toStandardDuration().getMillis();
    log.info("Starting merge and push.");
    DateTime minTimestampAsDate = segmentGranularity.truncate(
        new DateTime(
            Math.max(
                windowMillis,
View Full Code Here

Examples of org.joda.time.Period.toStandardDuration()

            if (input2.startsWith("P")) {
                Period ip = p.parsePeriod(input2);
                DateTime odt2;
                if (!minus)
                    odt2 = odt1.plus(ip.toStandardDuration().getMillis());
                else
                    odt2 = odt1.minus(ip.toStandardDuration().getMillis());
                odt = odt + "|" + odt2.toString();
            } else {
                DateTime idt = parseBasicOrFullDateTime(input2);
View Full Code Here

Examples of org.joda.time.Period.toStandardDuration()

                Period ip = p.parsePeriod(input2);
                DateTime odt2;
                if (!minus)
                    odt2 = odt1.plus(ip.toStandardDuration().getMillis());
                else
                    odt2 = odt1.minus(ip.toStandardDuration().getMillis());
                odt = odt + "|" + odt2.toString();
            } else {
                DateTime idt = parseBasicOrFullDateTime(input2);
                DateTime odt2 = dto.parseDateTime(idt.toString()).withZone(
                        DateTimeZone.forID("UTC"));
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.