public class RotateStrategyByDate extends java.lang.Object implements RotateStrategy
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
m_current |
private java.util.Date |
m_date |
private java.text.SimpleDateFormat |
m_format |
Constructor and Description |
---|
RotateStrategyByDate()
Creation of a new rotation strategy based on a date policy.
|
RotateStrategyByDate(java.lang.String pattern)
Creation of a new rotation strategy based on a date policy
using a supplied pattern.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRotationNeeded(java.lang.String data,
java.io.File file)
Test is a rotation is required.
|
void |
reset()
Reset the strategy.
|
private java.text.SimpleDateFormat m_format
private java.util.Date m_date
private java.lang.String m_current
public RotateStrategyByDate()
public RotateStrategyByDate(java.lang.String pattern)
pattern
- the message formatting patternpublic void reset()
reset
in interface RotateStrategy
public boolean isRotationNeeded(java.lang.String data, java.io.File file)
isRotationNeeded
in interface RotateStrategy
data
- not usedfile
- not used