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

## org.apache.logging.log4j.core.appender.rolling
Class TimeBasedTriggeringPolicy

    java.lang.Object
      org.apache.logging.log4j.core.appender.rolling.TimeBasedTriggeringPolicy

All Implemented Interfaces:
  TriggeringPolicy

    @Plugin(name="TimeBasedTriggeringPolicy",
            category="Core",
            printObject=true)
    public final class TimeBasedTriggeringPolicy

extends Object
implements TriggeringPolicy

Triggering Policy that causes a rollover based on time.

Method Summary
`static TimeBasedTriggeringPolicy` | `createPolicy(String interval, String modulate)` Create a TimeBasedTriggeringPolicy.
`void` | `initialize(RollingFileManager manager)` Initialize the policy.
`boolean` | `isTriggeringEvent(LogEvent event)` Determine whether a rollover should occur.
`String` | `toString()`

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

Method Detail

### initialize

    public void initialize(RollingFileManager manager)

  Initialize the policy.

  Specified by:
    `initialize` in interface `TriggeringPolicy`
  Parameters:
    `manager` - The RollingFileManager.

### isTriggeringEvent

    public boolean isTriggeringEvent(LogEvent event)

  Determine whether a rollover should occur.

  Specified by:
    `isTriggeringEvent` in interface `TriggeringPolicy`
  Parameters:
    `event` - A reference to the currently event.
  Returns:
    true if a rollover should occur.

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### createPolicy

    @PluginFactory
    public static TimeBasedTriggeringPolicy createPolicy(@PluginAttribute(value="interval")
                                                                       String interval,
                                                                       @PluginAttribute(value="modulate")
                                                                       String modulate)

  Create a TimeBasedTriggeringPolicy.

  Parameters:
    `interval` - The interval between rollovers.
    `modulate` - If true the time will be rounded to occur on a boundary aligned with the increment.
  Returns:
    a TimeBasedTriggeringPolicy.

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

Copyright © 1999-2015 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.