Package org.forgerock.audit.rotation
Class SizeBasedRotationPolicy
- java.lang.Object
 - 
- org.forgerock.audit.rotation.SizeBasedRotationPolicy
 
 
- 
- All Implemented Interfaces:
 RotationPolicy
public class SizeBasedRotationPolicy extends Object implements RotationPolicy
Creates a file size based rotation policy. Once a file is a given size in bytes it is rotated. 
- 
- 
Constructor Summary
Constructors Constructor Description SizeBasedRotationPolicy(long maxFileSizeInBytes)Constructs a SizeBasedRotationPolicy given a max file size in bytes. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetMaxFileSizeInBytes()Gets the maximum size (in bytes) a file may grow to before being rotated.booleanshouldRotateFile(RotatableObject file)Indicates whether or not aRotatableObjectneeds rotation. 
 - 
 
- 
- 
Method Detail
- 
shouldRotateFile
public boolean shouldRotateFile(RotatableObject file)
Indicates whether or not aRotatableObjectneeds rotation.- Specified by:
 shouldRotateFilein interfaceRotationPolicy- Parameters:
 file- TheRotatableObjectto be checked.- Returns:
 - True - If the 
RotatableObjectneeds rotation. False - If theRotatableObjectdoesn't need rotation. 
 
- 
getMaxFileSizeInBytes
public long getMaxFileSizeInBytes()
Gets the maximum size (in bytes) a file may grow to before being rotated.- Returns:
 - the maximum file size permitted by this policy.
 
 
 - 
 
 -