Examples of addPeriod()


Examples of com.volantis.shared.time.Time.addPeriod()

                            final SystemClock clock =
                                SystemClock.getDefaultInstance();
                            final Time currentTime = clock.getCurrentTime();
                            final PipelineCacheState pcs =
                                new PipelineCacheState(currentTime.addPeriod(
                                    dependency.getTimeToLive()));
                            dependencyContext.addDependency(dependency);

                            // update the cache with the old value so other
                            // threads don't need to wait the timeout period
View Full Code Here

Examples of com.volantis.shared.time.Time.addPeriod()

        Time currentTime = clock.getCurrentTime();
        if (initialPolicy == null) {
            // Calculate the expiration time based on the retry interval. A
            // retry interval of 0 (or less) will result in the policy being
            // retried immediately on the next request.
            expirationTime = currentTime.addPeriod(retryIntervalInMS);

            // The next attempt by the provider to retrieve the object is the
            // first retry.
            retryCount = 1;
View Full Code Here

Examples of com.volantis.shared.time.Time.addPeriod()

            retryCount = 1;

        } else {
            Period timeToLive = Period.treatNonPositiveAsIndefinitely(
                    cacheControl.getTimeToLive() * 1000);
            expirationTime = currentTime.addPeriod(timeToLive);

            // No retrievals have failed yet so the next retrieval is not a
            // retry.
            retryCount = 0;
        }
View Full Code Here

Examples of com.volantis.shared.time.Time.addPeriod()

        if (retryFailedRetrieval && retryCount < maxRetryCount) {

            // Retry is supported so set the expiration time so
            // that this will expire when it needs to retry.
            Time currentTime = clock.getCurrentTime();
            expirationTime = currentTime.addPeriod(retryIntervalInMS);

            // If the previous policy should be retained while retrying
            // then return that instead of null.
            if (retainDuringRetry) {
                policy = expiredPolicy;
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.