Jive Forums API (5.5.20.2-oracle) Developer Javadocs

com.jivesoftware.base.log
Interface RotateStrategy

All Known Implementing Classes:
RotateStrategyBySize

public interface RotateStrategy

Strategy that checks condition under which file rotation is needed.


Method Summary
 void initializeSize(java.io.File file)
          Initializes the size of the strategy from the length of the given file.
 boolean isRotationNeeded(java.lang.String data, java.io.File file)
          Check if a log rotation is neccessary at this time.
 void reset()
          reset cumulative rotation history data.
 

Method Detail

reset

void reset()
reset cumulative rotation history data. Called after rotation.


isRotationNeeded

boolean isRotationNeeded(java.lang.String data,
                         java.io.File file)
Check if a log rotation is neccessary at this time.

Parameters:
data - the serialized version of last message written to the log system
file - the File that we are writing to
Returns:
boolean return true if log rotation is neccessary, else false

initializeSize

void initializeSize(java.io.File file)
Initializes the size of the strategy from the length of the given file.

Parameters:
file - the File that will be written to

Jive Forums Project Page

Copyright © 1999-2006 Jive Software.