public class SizeRolloverStrategy extends AbstractRolloverStrategy
RolloverStrategy
using a size limiting a rollover operation.Constructor and Description |
---|
SizeRolloverStrategy()
Instantiates a new size rollover strategy.
|
SizeRolloverStrategy(long rolloverSize)
Instantiates a new size rollover strategy.
|
SizeRolloverStrategy(java.lang.String rolloverSize)
Instantiates a new size rollover strategy.
|
Modifier and Type | Method and Description |
---|---|
SizeRolloverStrategy |
createInstance()
Creates a new instance of
RolloverStrategy . |
boolean |
hasRolled()
Checks if strategy wants to rollover.
|
void |
reset()
Reset the strategy state.
|
void |
setRolloverSize(long rolloverSize)
Sets the rollover size.
|
getOrder, getPosition, setOrder, setWritePosition
public SizeRolloverStrategy()
public SizeRolloverStrategy(long rolloverSize)
rolloverSize
- the rollover sizepublic SizeRolloverStrategy(java.lang.String rolloverSize)
rolloverSize
- the rollover sizepublic boolean hasRolled()
RolloverStrategy
public void setRolloverSize(long rolloverSize)
rolloverSize
- the new rollover sizepublic void reset()
RolloverStrategy
public SizeRolloverStrategy createInstance()
RolloverStrategyFactory
RolloverStrategy
.createInstance
in interface RolloverStrategyFactory<RolloverStrategy>
createInstance
in class AbstractRolloverStrategy