Class DefaultRoundedInstantFactory

    • Constructor Detail

      • DefaultRoundedInstantFactory

        public DefaultRoundedInstantFactory​(CacheProperties cacheProperties)
    • Method Detail

      • roundNow

        public RoundedInstant roundNow​(@Nullable
                                       TemporalIdentifier temporalIdentifier)
        Description copied from interface: RoundedInstantFactory
        Given a TemporalIdentifier 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 interface RoundedInstantFactory
        Parameters:
        temporalIdentifier - The TemporalIdentifier instance that can generate the target, specific current time.
        Returns:
        The current, specific time and the rounded time.