Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jivesoftware.util.log.output.io.rotate
Class RotateStrategyBySize

    java.lang.Object
      org.jivesoftware.util.log.output.io.rotate.RotateStrategyBySize

All Implemented Interfaces:
  RotateStrategy

    public class RotateStrategyBySize

extends Object
implements RotateStrategy

Rotation stragety based on size written to log file.

Author:
  Bernhard Huber

Constructor Summary
`RotateStrategyBySize()` Rotate logs by size.
`RotateStrategyBySize(long maxSize)` Rotate logs by size.

Method Summary
`boolean` | `isRotationNeeded(String data, File file)` Check if now a log rotation is neccessary.
`void` | `reset()` reset log size written so far.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RotateStrategyBySize

    public RotateStrategyBySize()

  Rotate logs by size. By default do log rotation after writing approx. 1MB of messages

### RotateStrategyBySize

    public RotateStrategyBySize(long maxSize)

  Rotate logs by size.

  Parameters:
    `maxSize` - rotate after writing max_size [byte] of messages

Method Detail

### reset

    public void reset()

  reset log size written so far.

  Specified by:
    `reset` in interface `RotateStrategy`

### isRotationNeeded

    public boolean isRotationNeeded(String data,
                                    File file)

  Check if now a log rotation is neccessary.

  Specified by:
    `isRotationNeeded` in interface `RotateStrategy`
  Parameters:
    `data` - the 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Openfire 3.4.3 Javadoc
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Jive Software.