Class MetaDataVersionStampStoreStateCacheFactory

    • Field Detail

      • UNLIMITED

        public static final long UNLIMITED
        A constant indicating that the cache should be of unlimited size or keep items for an unlimited time.
        See Also:
        Constant Field Values
      • DEFAULT_MAX_SIZE

        public static final long DEFAULT_MAX_SIZE
        The default maximum number of items to include in the cache.
        See Also:
        Constant Field Values
      • DEFAULT_EXPIRE_AFTER_ACCESS_MILLIS

        public static final long DEFAULT_EXPIRE_AFTER_ACCESS_MILLIS
        The default amount of time in milliseconds after last access that cache entries should start to be expired.
    • Constructor Detail

      • MetaDataVersionStampStoreStateCacheFactory

        public MetaDataVersionStampStoreStateCacheFactory()
    • Method Detail

      • setExpireAfterAccessMillis

        @Nonnull
        public MetaDataVersionStampStoreStateCacheFactory setExpireAfterAccessMillis​(long expireAfterAccessMillis)
        Set the number of milliseconds to keep an item in produced caches after it has been accessed. This value can be set to UNLIMITED to indicate that the items in caches produced by this factory should not be limited by time.
        Parameters:
        expireAfterAccessMillis - the amount of time to keep the item in each cache after last access
        Returns:
        this factory
      • getDefaultExpireAfterAccessMillis

        public long getDefaultExpireAfterAccessMillis()
        Get the amount of time in milliseconds that each entry is kept in each cache after its last access.
        Returns:
        the amount of time to keep the item in each cache after last access
      • setMaxSize

        @Nonnull
        public MetaDataVersionStampStoreStateCacheFactory setMaxSize​(long maxSize)
        Set the maximum number of elements to keep in produced caches. This value can be set to UNLIMITED to indicate that no maximum size should be imposed on the number of items in each cache.
        Parameters:
        maxSize - the maximum number of elements to keep in each cache
        Returns:
        this factory
      • getMaxSize

        public long getMaxSize()
        Get the maximum number of elements to keep in produced caches.
        Returns:
        the maximum number of elements to keep in each cache