Simple Log 2.0.1
[grlea]

org.grlea.log.rollover
Interface RolloverStrategy


public interface RolloverStrategy

An interface for objects that wish to be able to decide when log files should be rolled over.

Version:
$Revision: 1.2 $
Author:
Graham Lea

Method Summary
 void configure(java.util.Map properties)
          Reads from the given map any properties that affect the behaviour of this strategy.
 boolean rolloverNow(java.util.Date fileCreated, long fileLength)
          Decides whether or not the log file should be rolled over immediately.
 

Method Detail

configure

public void configure(java.util.Map properties)
               throws java.io.IOException
Reads from the given map any properties that affect the behaviour of this strategy.

Parameters:
properties - an unmodifiable map of properties, i.e. String keys with String values
Throws:
java.io.IOException - if an error occurs while configuring the strategy.

rolloverNow

public boolean rolloverNow(java.util.Date fileCreated,
                           long fileLength)
Decides whether or not the log file should be rolled over immediately.

Parameters:
fileCreated - the date and time at which the current log file was created
fileLength - the current length of the log file
Returns:
true if the log file should be rolled over now, false if it should not.

Copyright (c) 2004-2006, Graham Lea. All rights reserved.