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 DurationgetRotationInterval()Gets the rotation duration interval.booleanshouldRotateFile(RotatableObject rotatable)Checks whether or not aRotatableObjectneeds rotation.
-
-
-
Method Detail
-
shouldRotateFile
public boolean shouldRotateFile(RotatableObject rotatable)
Checks whether or not aRotatableObjectneeds rotation.- Specified by:
shouldRotateFilein interfaceRotationPolicy- Parameters:
rotatable- The rotatable to be checked.- Returns:
- True - If the
RotatableObjectneeds rotation. False - If theRotatableObjectdoesn't need rotation.
-
-