Class GridCacheTtlManager

    • Field Detail

      • hasPendingEntries

        protected volatile boolean hasPendingEntries
        Indicates that
      • nextCleanTime

        protected volatile long nextCleanTime
        Timestamp when next clean try will be allowed. Used for throttling on per-cache basis.
    • Constructor Detail

      • GridCacheTtlManager

        public GridCacheTtlManager()
    • Method Detail

      • eagerTtlEnabled

        public boolean eagerTtlEnabled()
        Returns:
        True if eager ttl is enabled for cache.
      • unregister

        public void unregister()
        Unregister this TTL manager of cache from periodical check on expired entries.
      • hasPendingEntries

        public void hasPendingEntries​(boolean update)
        Updates the flag hasPendingEntries with the given value.
        Parameters:
        update - true if the underlying pending tree has entries with expire policy enabled.
      • hasPendingEntries

        public boolean hasPendingEntries()
        Returns:
        true if the underlying pending tree has entries with expire policy enabled.
      • expire

        public boolean expire​(int amount)
        Processes specified amount of expired entries.
        Parameters:
        amount - Limit of processed entries by single call, -1 for no limit.
        Returns:
        True if unprocessed expired entries remains.