Class TrashRemovalStatisticThreadLocal

java.lang.Object
com.atlassian.confluence.impl.retention.analytics.TrashRemovalStatisticThreadLocal

public class TrashRemovalStatisticThreadLocal extends Object
Hold statistics for a running trash removal job
Since:
7.14.0
  • Constructor Details

    • TrashRemovalStatisticThreadLocal

      public TrashRemovalStatisticThreadLocal()
  • Method Details

    • withStatistic

      public static void withStatistic(@Nullable TrashRemovalStatistic stats, Runnable runnable)
      Perform some trash removal actions while recording statistics into a stats holder
      Parameters:
      stats - an object to hold statistics for current job
      runnable - some actions whose effects will be recorded
    • getCurrentStatistic

      public static Optional<TrashRemovalStatistic> getCurrentStatistic()
      Returns:
      statistics holder for current trash removal job, if any