Package org.joda.time

Examples of org.joda.time.Instant.toDate()


        System.out.println("Change millis:        in.withMillis(0):         " + in.withMillis(0L));
        System.out.println("");
        System.out.println("Convert to Instant:   in.toInstant():           " + in.toInstant());
        System.out.println("Convert to DateTime:  in.toDateTime():          " + in.toDateTime());
        System.out.println("Convert to MutableDT: in.toMutableDateTime():   " + in.toMutableDateTime());
        System.out.println("Convert to Date:      in.toDate():              " + in.toDate());
        System.out.println("");
        System.out.println("                      in2 = new Instant(in.getMillis() + 10)");
        Instant in2 = new Instant(in.getMillis() + 10);
        System.out.println("Equals ms and chrono: in.equals(in2):           " + in.equals(in2));
        System.out.println("Compare millisecond:  in.compareTo(in2):        " + in.compareTo(in2));
View Full Code Here


        mail.postpones++;
        if (mail.postpones <= 3) {
            Instant newScheduleDate =
                    new DateTime().plusSeconds(e.getRecommendedDelay())
                            .toInstant();
            mail.scheduleDate = newScheduleDate.toDate();
            retryTransmitter.transmit(mail);
            logger.debug("Delivery must be postponed to all hosts. "
                    + "Rescheduling the attempt. This is the " + mail.postpones
                    + ". postponing of this delivery attempt.");
View Full Code Here

            if (transientFailures.isEmpty())
                return;
            Period waitingPeriod = retryPeriods.get(mail.deliveryAttempts - 1);
            Instant newScheduleDate =
                    new DateTime().plus(waitingPeriod).toInstant();
            mail.scheduleDate = newScheduleDate.toDate();
            mail.recipients = calculateTemporarilyRejectedRecipientList();
            retryTransmitter.transmit(mail);
            logger.debug("Transient failure, the mail is scheduled for a "
                    + (mail.deliveryAttempts + 1) + ". attempt "
                    + waitingPeriod + " later on " + newScheduleDate);
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.