public class ChainedRolloverStrategy extends java.lang.Object implements RolloverStrategy
RolloverStrategy
which is simply chaining other strategies.Constructor and Description |
---|
ChainedRolloverStrategy()
Instantiates a new chained rollover strategy.
|
ChainedRolloverStrategy(java.util.List<? extends RolloverStrategy> strategies)
Instantiates a new chained rollover strategy.
|
Modifier and Type | Method and Description |
---|---|
ChainedRolloverStrategy |
createInstance()
Creates a new instance of
RolloverStrategy . |
java.util.List<? extends RolloverStrategy> |
getStrategies()
Gets the strategies.
|
boolean |
hasRolled()
Checks if strategy wants to rollover.
|
void |
register(RolloverStrategy strategy)
Register a new strategy.
|
void |
reset()
Reset the strategy state.
|
void |
setStrategies(java.util.List<? extends RolloverStrategy> strategies)
Sets the list of strategies.
|
void |
setWritePosition(long position)
Sets the write position.
|
public ChainedRolloverStrategy()
public ChainedRolloverStrategy(java.util.List<? extends RolloverStrategy> strategies)
strategies
- the strategiespublic boolean hasRolled()
RolloverStrategy
hasRolled
in interface RolloverStrategy
public void reset()
RolloverStrategy
reset
in interface RolloverStrategy
public void setWritePosition(long position)
RolloverStrategy
setWritePosition
in interface RolloverStrategy
position
- the new write positionpublic ChainedRolloverStrategy createInstance()
RolloverStrategyFactory
RolloverStrategy
.createInstance
in interface RolloverStrategyFactory<RolloverStrategy>
public void setStrategies(java.util.List<? extends RolloverStrategy> strategies)
strategies
- the new strategiespublic void register(RolloverStrategy strategy)
strategy
- the strategypublic java.util.List<? extends RolloverStrategy> getStrategies()