Class DefaultRoundedInstantFactory
java.lang.Object
com.broadleafcommerce.common.extension.cache.temporal.DefaultRoundedInstantFactory
- All Implemented Interfaces:
RoundedInstantFactory
Default instance of
RoundedInstantFactory
.- Author:
- Jeff Fischer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionroundNow
(TemporalIdentifier temporalIdentifier) Given aTemporalIdentifier
instance, return a rounded version of the current instance in time based on an increment modulus.
-
Constructor Details
-
DefaultRoundedInstantFactory
-
-
Method Details
-
roundNow
Description copied from interface:RoundedInstantFactory
Given aTemporalIdentifier
instance, return a rounded version of the current instance in time based on an increment modulus. Also, return the specific instance of current time. The rounded version is useful as a cache key by reducing the jitter.- Specified by:
roundNow
in interfaceRoundedInstantFactory
- Parameters:
temporalIdentifier
- TheTemporalIdentifier
instance that can generate the target, specific current time.- Returns:
- The current, specific time and the rounded time.
-