Spring for Apache Hadoop

org.springframework.data.hadoop.store.strategy.rollover
Interface RolloverStrategy

All Known Implementing Classes:
AbstractRolloverStrategy, ChainedRolloverStrategy, NoRolloverStrategy, SizeRolloverStrategy

public interface RolloverStrategy

A strategy interface used for file or stream writers to determine when a file or a stream should be rolled over. Usual use case is to roll if file size becomes too large or if written entries should be partitioned with a certain time slots.

Author:
Janne Valkealahti

Method Summary
 boolean hasRolled()
          Checks if strategy wants to rollover.
 void reset()
          Reset the strategy state.
 void setWritePosition(long position)
          Sets the write position.
 

Method Detail

hasRolled

boolean hasRolled()
Checks if strategy wants to rollover.

Returns:
true, if rollover should happen

reset

void reset()
Reset the strategy state.


setWritePosition

void setWritePosition(long position)
Sets the write position.

Parameters:
position - the new write position

Spring for Apache Hadoop