Package org.forgerock.audit.rotation
Class FixedTimeRotationPolicy
java.lang.Object
org.forgerock.audit.rotation.FixedTimeRotationPolicy
- All Implemented Interfaces:
RotationPolicy
Rotates audit files at fixed times throughout the day.
-
Constructor Summary
ConstructorsConstructorDescriptionFixedTimeRotationPolicy(List<Duration> rotationTimes) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionstatic FixedTimeRotationPolicyfixedTimeRotationPolicy(List<Duration> rotationTimes) Constructs aFixedTimeRotationPolicygiven a list of milliseconds after midnight to rotateIfNeeded the files.Get the list of times since midnight that rotation will occur at.Deprecated, for removal: This API element is subject to removal in a future version.UsegetDailyRotationTimeDurations()instead.booleanshouldRotateFile(RotatableObject rotatable) This method indicates if the log file should be rotated or not.
-
Constructor Details
-
FixedTimeRotationPolicy
@Deprecated(since="27.0.0", forRemoval=true) public FixedTimeRotationPolicy(List<Duration> rotationTimes) Deprecated, for removal: This API element is subject to removal in a future version.UsefixedTimeRotationPolicy(List)instead.Constructs aFixedTimeRotationPolicygiven a list of milliseconds after midnight to rotateIfNeeded the files.- Parameters:
rotationTimes- List ofDurationobjects specifying the time after midnight to rotate the log file.
-
-
Method Details
-
fixedTimeRotationPolicy
Constructs aFixedTimeRotationPolicygiven a list of milliseconds after midnight to rotateIfNeeded the files.- Parameters:
rotationTimes- List ofDurationobjects specifying the time after midnight to rotate the log file.- Returns:
- A
FixedTimeRotationPolicyinstance.
-
shouldRotateFile
Description copied from interface:RotationPolicyThis method indicates if the log file should be rotated or not.- Specified by:
shouldRotateFilein interfaceRotationPolicy- Parameters:
rotatable- The file to be checked.- Returns:
- True if the log file should be rotated, false otherwise.
-
getDailyRotationTimeDurations
Get the list of times since midnight that rotation will occur at.- Returns:
- The list of times as
Durationinstances.
-
getDailyRotationTimes
Deprecated, for removal: This API element is subject to removal in a future version.UsegetDailyRotationTimeDurations()instead.Get the list of times since midnight that rotation will occur at.- Returns:
- The list of times as
Durationinstances.
-
fixedTimeRotationPolicy(List)instead.