Package org.forgerock.audit.rotation
Class TimeLimitRotationPolicy
java.lang.Object
org.forgerock.audit.rotation.TimeLimitRotationPolicy
- All Implemented Interfaces:
RotationPolicy
Creates a rotation policy based on a time duration. Once the duration has passed the policy will indicate a
file rotation is necessary.
-
Constructor Summary
ConstructorDescriptionTimeLimitRotationPolicy
(Duration rotationInterval) Constructs a TimeLimitRotationPolicy with a givenDuration
. -
Method Summary
Modifier and TypeMethodDescriptionGets the rotation duration interval.boolean
shouldRotateFile
(RotatableObject rotatable) Checks whether or not aRotatableObject
needs rotation.
-
Constructor Details
-
TimeLimitRotationPolicy
Constructs a TimeLimitRotationPolicy with a givenDuration
.- Parameters:
rotationInterval
- The interval to rotate at.
-
-
Method Details
-
shouldRotateFile
Checks whether or not aRotatableObject
needs rotation.- Specified by:
shouldRotateFile
in interfaceRotationPolicy
- Parameters:
rotatable
- The rotatable to be checked.- Returns:
- True - If the
RotatableObject
needs rotation. False - If theRotatableObject
doesn't need rotation.
-
getRotationInterval
Gets the rotation duration interval.- Returns:
- The interval as a
Duration
.
-