org.springframework.data.hadoop.store.strategy.rollover
Class AbstractRolloverStrategy
java.lang.Object
org.springframework.data.hadoop.store.strategy.rollover.AbstractRolloverStrategy
- All Implemented Interfaces:
- org.springframework.core.Ordered, RolloverStrategy
- Direct Known Subclasses:
- NoRolloverStrategy, SizeRolloverStrategy
public abstract class AbstractRolloverStrategy
- extends java.lang.Object
- implements RolloverStrategy, org.springframework.core.Ordered
Base class for RolloverStrategy
implementations. This class also implements Ordered
interface to be
useful with ChainedFileRolloverStrategy
and OrderedComposite
.
- Author:
- Janne Valkealahti
Fields inherited from interface org.springframework.core.Ordered |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE |
Method Summary |
int |
getOrder()
Implementation should override this method to define a chaining order. |
long |
getPosition()
|
void |
setOrder(int order)
Sets the order. |
void |
setWritePosition(long position)
Sets the write position. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractRolloverStrategy
public AbstractRolloverStrategy()
getOrder
public int getOrder()
- Implementation should override this method to define a chaining order.
- Specified by:
getOrder
in interface org.springframework.core.Ordered
- Returns:
- the order value
- See Also:
Ordered.getOrder()
setWritePosition
public void setWritePosition(long position)
- Description copied from interface:
RolloverStrategy
- Sets the write position.
- Specified by:
setWritePosition
in interface RolloverStrategy
- Parameters:
position
- the new write position
setOrder
public void setOrder(int order)
- Sets the order.
- Parameters:
order
- the new order- See Also:
Ordered
getPosition
public long getPosition()