public class OrRotateStrategy extends java.lang.Object implements RotateStrategy
isRotationNeeded
method checks the first rotation
strategy object. If a rotation is needed, this result is returned.
If not, the next rotation strategy object is checked, and so on.Modifier and Type | Field and Description |
---|---|
private RotateStrategy[] |
m_strategies |
private int |
m_usedRotation
The rotation strategy used.
|
Constructor and Description |
---|
OrRotateStrategy(RotateStrategy[] strategies)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRotationNeeded(java.lang.String data,
java.io.File file)
check if now a log rotation is neccessary.
|
void |
reset()
reset.
|
private RotateStrategy[] m_strategies
private int m_usedRotation
public OrRotateStrategy(RotateStrategy[] strategies)
strategies
- the set of rotation strategiespublic void reset()
reset
in interface RotateStrategy
public boolean isRotationNeeded(java.lang.String data, java.io.File file)
isRotationNeeded
method checks the first rotation
strategy object. If a rotation is needed, this result is returned.
If not the next rotation strategy object is asked and so on.isRotationNeeded
in interface RotateStrategy
data
- the last message written to the log systemfile
- ???