Interface RoundedInstantFactory
-
- All Known Implementing Classes:
DefaultRoundedInstantFactory
public interface RoundedInstantFactory
Factory forInstant
creation for use in driving temporal aspects of the software, such as active date filtering in queries.- Author:
- Jeff Fischer
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RoundedInstant
roundNow(TemporalIdentifier temporalIdentifier)
Given aTemporalIdentifier
instance, return a rounded version of the current instance in time based on an increment modulus.
-
-
-
Method Detail
-
roundNow
RoundedInstant roundNow(@Nullable TemporalIdentifier temporalIdentifier)
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.- Parameters:
temporalIdentifier
- TheTemporalIdentifier
instance that can generate the target, specific current time.- Returns:
- The current, specific time and the rounded time.
-
-