Class DefaultRoundedInstantFactory
- java.lang.Object
 - 
- com.broadleafcommerce.common.extension.cache.temporal.DefaultRoundedInstantFactory
 
 
- 
- All Implemented Interfaces:
 RoundedInstantFactory
public class DefaultRoundedInstantFactory extends Object implements RoundedInstantFactory
Default instance ofRoundedInstantFactory.- Author:
 - Jeff Fischer
 
 
- 
- 
Constructor Summary
Constructors Constructor Description DefaultRoundedInstantFactory(CacheProperties cacheProperties) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RoundedInstantroundNow(TemporalIdentifier temporalIdentifier)Given aTemporalIdentifierinstance, return a rounded version of the current instance in time based on an increment modulus. 
 - 
 
- 
- 
Constructor Detail
- 
DefaultRoundedInstantFactory
public DefaultRoundedInstantFactory(CacheProperties cacheProperties)
 
 - 
 
- 
Method Detail
- 
roundNow
public RoundedInstant roundNow(@Nullable TemporalIdentifier temporalIdentifier)
Description copied from interface:RoundedInstantFactoryGiven aTemporalIdentifierinstance, 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:
 roundNowin interfaceRoundedInstantFactory- Parameters:
 temporalIdentifier- TheTemporalIdentifierinstance that can generate the target, specific current time.- Returns:
 - The current, specific time and the rounded time.
 
 
 - 
 
 -