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 Summary
Constructors Constructor Description TrashRemovalStatisticThreadLocal()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Optional<TrashRemovalStatistic>
getCurrentStatistic()
static void
withStatistic(@Nullable TrashRemovalStatistic stats, Runnable runnable)
Perform some trash removal actions while recording statistics into a stats holder
-
-
-
Method Detail
-
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 jobrunnable
- some actions whose effects will be recorded
-
getCurrentStatistic
public static Optional<TrashRemovalStatistic> getCurrentStatistic()
- Returns:
- statistics holder for current trash removal job, if any
-
-