Top Description Fields Constructors Methods
org.apache.log.output.io.rotate

public Class RotateStrategyByDate

extends Object
implements RotateStrategy
Class Inheritance
All Implemented Interfaces
org.apache.log.output.io.rotate.RotateStrategy
Imports
java.io.File, java.text.SimpleDateFormat, java.util.Date

Rotation stragety based on SimpleDateFormat.
Authors
Avalon Development Team, Eung-ju Park
Version
$Id: RotateStrategyByDate.java 506267 2007-02-12 04:06:06Z crossley $

Field Summary

Modifier and TypeField and Description
private String
private Date
private SimpleDateFormat

Constructor Summary

AccessConstructor and Description
public
RotateStrategyByDate()

Creation of a new rotation strategy based on a date policy.

public
RotateStrategyByDate(final String
the message formatting pattern
pattern
)

Creation of a new rotation strategy based on a date policy using a supplied pattern.

Method Summary

Modifier and TypeMethod and Description
public boolean

Returns:

TRUE if a rotation is required else FALSE
isRotationNeeded
(final String
not used
data
,
final File
not used
file
)

Implements org.apache.log.output.io.rotate.RotateStrategy.isRotationNeeded.

Test is a rotation is required.
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_currentback to summary
private String m_current
m_dateback to summary
private Date m_date
m_formatback to summary
private SimpleDateFormat m_format

Constructor Detail

RotateStrategyByDateback to summary
public RotateStrategyByDate()

Creation of a new rotation strategy based on a date policy.

RotateStrategyByDateback to summary
public RotateStrategyByDate(final String pattern)

Creation of a new rotation strategy based on a date policy using a supplied pattern.

Parameters
pattern:String

the message formatting pattern

Method Detail

isRotationNeededback to summary
public boolean isRotationNeeded(final String data, final File file)

Implements org.apache.log.output.io.rotate.RotateStrategy.isRotationNeeded.

Test is a rotation is required. Documentation pending ??

Parameters
data:String

not used

file:File

not used

Returns:boolean

TRUE if a rotation is required else FALSE

resetback to summary
public void reset()

Implements org.apache.log.output.io.rotate.RotateStrategy.reset.

Reset the strategy.