Package org.forgerock.audit.rotation
Class TimeLimitRotationPolicy
- java.lang.Object
-
- org.forgerock.audit.rotation.TimeLimitRotationPolicy
-
- All Implemented Interfaces:
RotationPolicy
public class TimeLimitRotationPolicy extends Object implements 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
Constructors Constructor Description TimeLimitRotationPolicy(Duration rotationInterval)
Constructs a TimeLimitRotationPolicy with a givenDuration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Duration
getRotationInterval()
Gets the rotation duration interval.boolean
shouldRotateFile(RotatableObject rotatable)
Checks whether or not aRotatableObject
needs rotation.
-
-
-
Method Detail
-
shouldRotateFile
public boolean shouldRotateFile(RotatableObject rotatable)
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.
-
-