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
ConstructorsConstructorDescriptionTimeLimitRotationPolicy
(Duration rotationInterval) Constructs a TimeLimitRotationPolicy with a givenDuration
.TimeLimitRotationPolicy
(Duration rotationInterval) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated, for removal: This API element is subject to removal in a future version.UsegetRotationIntervalDuration()
instead.Gets the rotation duration interval.boolean
shouldRotateFile
(RotatableObject rotatable) Checks whether aRotatableObject
needs rotation.
-
Constructor Details
-
TimeLimitRotationPolicy
Constructs a TimeLimitRotationPolicy with a givenDuration
.- Parameters:
rotationInterval
- The interval to rotate at.
-
TimeLimitRotationPolicy
@Deprecated(since="27.0.0", forRemoval=true) public TimeLimitRotationPolicy(Duration rotationInterval) Deprecated, for removal: This API element is subject to removal in a future version.UseTimeLimitRotationPolicy(java.time.Duration)
instead.Constructs a TimeLimitRotationPolicy with a givenDuration
.- Parameters:
rotationInterval
- The interval to rotate at.
-
-
Method Details
-
shouldRotateFile
Checks whether 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.
-
getRotationIntervalDuration
Gets the rotation duration interval.- Returns:
- The interval as a
Duration
.
-
getRotationInterval
Deprecated, for removal: This API element is subject to removal in a future version.UsegetRotationIntervalDuration()
instead.Gets the rotation duration interval.- Returns:
- The interval as a
Duration
.
-
TimeLimitRotationPolicy(java.time.Duration)
instead.