public class RotateStrategyByTime extends Object implements RotateStrategy
Constructor and Description |
---|
RotateStrategyByTime()
Rotate logs by time.
|
RotateStrategyByTime(long timeInterval)
Rotate logs by time.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isRotationNeeded(String data,
File file)
Check if now a log rotation is neccessary.
|
void |
reset()
reset interval history counters.
|
public RotateStrategyByTime()
public RotateStrategyByTime(long timeInterval)
timeInterval
- rotate before time-interval [ms] has expiredpublic void reset()
reset
in interface RotateStrategy
public boolean isRotationNeeded(String data, File file)
(current_time - m_startingTime) / m_timeInterval > m_currentRotation
rotation is needed.isRotationNeeded
in interface RotateStrategy
data
- the last message written to the log systemfile
- not usedCopyright © 1997–2024. All rights reserved.