Examples of plusSeconds()


Examples of org.goda.time.DateTime.plusSeconds()

      if (pointer == Pointer.PointerType.FUTURE) {
        if (tick.isAmbiguous()) {
          List<DateTime> futureDates = new LinkedList<DateTime>();
          futureDates.add( midnight.plusSeconds(tick.intValue()));
          futureDates.add(midnight.plusSeconds( halfDay + tick.intValue()));
          futureDates.add(tomorrowMidnight.plusSeconds(tick.intValue()));
          for (DateTime futureDate : futureDates) {
            if (futureDate.getMillis() > now.getMillis() || futureDate.equals(now)) {
              _currentTime = futureDate;
              done = true;
              break;
View Full Code Here

Examples of org.goda.time.DateTime.plusSeconds()

          }
        }
        else {
          List<DateTime> futureDates = new LinkedList<DateTime>();
          futureDates.add(midnight.plusSeconds(tick.intValue()));
          futureDates.add(tomorrowMidnight.plusSeconds(tick.intValue()));
          for (DateTime futureDate : futureDates) {
            if (futureDate.getMillis() > now.getMillis() || futureDate.equals(now)) {
              _currentTime = futureDate;
              done = true;
              break;
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

            validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
        }
       
        if (validFrom != null) {
            DateTime currentTime = new DateTime();
            currentTime = currentTime.plusSeconds(futureTTL);
            if (validFrom.isAfter(currentTime)) {
                LOG.debug("SAML Token condition (Not Before) not met");
                throw new WSSecurityException(WSSecurityException.FAILURE, "invalidSAMLsecurity");
            }
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

           
            // check if the IP hasn't been updated recently
            if (obj instanceof DateTime) {
              LOGGER.debug("CELLAR CLOUD: retrieved a DateTime from blog store");
                DateTime registeredTime = (DateTime) obj;
                if (registeredTime != null && registeredTime.plusSeconds(validityPeriod).isAfterNow()) {
                  LOGGER.debug("CELLAR CLOUD: adding member {}", ip);
                    members.add(ip);
                } else {
                  LOGGER.debug("CELLAR CLOUD: remove container {}", ip);
                    blobStore.removeBlob(container, ip);
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

                }
            } else if (obj instanceof ServiceContainer) {
              LOGGER.debug("CELLAR CLOUD: retrieved a ServiceContainer from blog store");
              ServiceContainer serviceContainer = (ServiceContainer) obj;
              DateTime registeredTime = serviceContainer.getRegisteredTime();
              if (registeredTime != null && registeredTime.plusSeconds(validityPeriod).isAfterNow()) {
                LOGGER.debug("CELLAR CLOUD: adding member {} for IP {}", serviceContainer.getHostName(), ip);
                    members.add(serviceContainer.getHostIp());
                } else {
                  LOGGER.debug("CELLAR CLOUD: remove container {}", ip);
                    blobStore.removeBlob(container, ip);
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

            validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
        }
       
        if (validFrom != null) {
            DateTime currentTime = new DateTime();
            currentTime = currentTime.plusSeconds(maxClockSkew);
            if (validFrom.isAfter(currentTime)) {
                LOG.debug("SAML Token condition (Not Before) not met");
                return false;
            }
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

        callbackHandler.setStatement(SAML2CallbackHandler.Statement.AUTHN);
        callbackHandler.setIssuer("www.example.com");
       
        ConditionsBean conditions = new ConditionsBean();
        DateTime notBefore = new DateTime();
        conditions.setNotBefore(notBefore.plusSeconds(30));
        conditions.setNotAfter(notBefore.plusMinutes(5));
        callbackHandler.setConditions(conditions);
       
        SAMLParms samlParms = new SAMLParms();
        samlParms.setCallbackHandler(callbackHandler);
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

            validTill = assertion.getSaml1().getConditions().getNotOnOrAfter();
        }
       
        if (validFrom != null) {
            DateTime currentTime = new DateTime();
            currentTime = currentTime.plusSeconds(maxClockSkew);
            if (validFrom.isAfter(currentTime)) {
                LOG.debug("SAML Token condition (Not Before) not met");
                return false;
            }
        }
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

            String ip = md.getName();
            Object obj = readBlob(container, ip);
            //Check if ip hasn't been updated recently.
            if (obj instanceof DateTime) {
                DateTime registeredTime = (DateTime) obj;
                if (registeredTime != null && registeredTime.plusSeconds(validityPeriod).isAfterNow()) {
                    members.add(ip);
                } else {
                    blobStore.removeBlob(container, ip);
                }
            }
View Full Code Here

Examples of org.joda.time.DateTime.plusSeconds()

        Set<MeasurementDataNumeric> data = new HashSet<MeasurementDataNumeric>();
        for (int i = 0; i < NUM_SCHEDULES; ++i) {
            DateTime time = currentHour;
            for (int j = 0; j < 120; ++j) {
                data.add(new MeasurementDataNumeric(time.getMillis(), i, random.nextDouble()));
                time = time.plusSeconds(30);
            }
        }
        WaitForRawInserts waitForRawInserts = new WaitForRawInserts(data.size());
        metricsServer.addNumericData(data, waitForRawInserts);
        waitForRawInserts.await("Failed to add raw data");
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.