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()
RolloverStrategyhasRolled in interface RolloverStrategypublic void reset()
RolloverStrategyreset in interface RolloverStrategypublic void setWritePosition(long position)
RolloverStrategysetWritePosition in interface RolloverStrategyposition - the new write positionpublic ChainedRolloverStrategy createInstance()
RolloverStrategyFactoryRolloverStrategy.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()