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 FixedTimeRotationPolicy
fixedTimeRotationPolicy
(List<Duration> rotationTimes) Constructs aFixedTimeRotationPolicy
given 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.boolean
shouldRotateFile
(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 aFixedTimeRotationPolicy
given a list of milliseconds after midnight to rotateIfNeeded the files.- Parameters:
rotationTimes
- List ofDuration
objects specifying the time after midnight to rotate the log file.
-
-
Method Details
-
fixedTimeRotationPolicy
Constructs aFixedTimeRotationPolicy
given a list of milliseconds after midnight to rotateIfNeeded the files.- Parameters:
rotationTimes
- List ofDuration
objects specifying the time after midnight to rotate the log file.- Returns:
- A
FixedTimeRotationPolicy
instance.
-
shouldRotateFile
Description copied from interface:RotationPolicy
This method indicates if the log file should be rotated or not.- Specified by:
shouldRotateFile
in 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
Duration
instances.
-
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
Duration
instances.
-
fixedTimeRotationPolicy(List)
instead.