Class CheckpointStatsCache


  • public class CheckpointStatsCache
    extends Object
    A size-based cache of accessed checkpoints for completed and failed checkpoints.

    Having this cache in place for accessed stats improves the user experience quite a bit as accessed checkpoint stats stay available and don't expire. For example if you manage to click on the last checkpoint in the history, it is not available via the stats as soon as another checkpoint is triggered. With the cache in place, the checkpoint will still be available for investigation.

    • Constructor Detail

      • CheckpointStatsCache

        public CheckpointStatsCache​(int maxNumEntries)
    • Method Detail

      • tryAdd

        public void tryAdd​(AbstractCheckpointStats checkpoint)
        Try to add the checkpoint to the cache.
        Parameters:
        checkpoint - Checkpoint to be added.
      • tryGet

        public AbstractCheckpointStats tryGet​(long checkpointId)
        Try to look up a checkpoint by it's ID in the cache.
        Parameters:
        checkpointId - ID of the checkpoint to look up.
        Returns:
        The checkpoint or null if checkpoint not found.