ch.qos.logback.core.rolling.helper
Class RollingCalendar

java.lang.Object
  extended by java.util.Calendar
      extended by java.util.GregorianCalendar
          extended by ch.qos.logback.core.rolling.helper.RollingCalendar
All Implemented Interfaces:
Serializable, Cloneable, Comparable<Calendar>

public class RollingCalendar
extends GregorianCalendar

RollingCalendar is a helper class to TimeBasedRollingPolicy or similar timed-based rolling policies. Given a periodicity type and the current time, it computes the start of the next interval (i.e. the triggering date).

Author:
Ceki Gülcü
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.GregorianCalendar
AD, BC
 
Fields inherited from class java.util.Calendar
ALL_STYLES, AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, LONG, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SHORT, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
 
Constructor Summary
RollingCalendar()
           
RollingCalendar(TimeZone tz, Locale locale)
           
 
Method Summary
 PeriodicityType computePeriodicity(String datePattern)
           
 Date getNextTriggeringDate(Date now)
           
 long getNextTriggeringMillis(Date now)
           
 Date getRelativeDate(Date now, int periods)
           
 void init(String datePattern)
           
 void printPeriodicity(ContextAwareBase cab)
           
 
Methods inherited from class java.util.GregorianCalendar
add, clone, computeFields, computeTime, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, getTimeZone, hashCode, isLeapYear, roll, roll, setGregorianChange, setTimeZone
 
Methods inherited from class java.util.Calendar
after, before, clear, clear, compareTo, complete, get, getAvailableLocales, getDisplayName, getDisplayNames, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RollingCalendar

public RollingCalendar()

RollingCalendar

public RollingCalendar(TimeZone tz,
                       Locale locale)
Method Detail

init

public void init(String datePattern)

getNextTriggeringMillis

public long getNextTriggeringMillis(Date now)

computePeriodicity

public PeriodicityType computePeriodicity(String datePattern)

printPeriodicity

public void printPeriodicity(ContextAwareBase cab)

getRelativeDate

public Date getRelativeDate(Date now,
                            int periods)

getNextTriggeringDate

public Date getNextTriggeringDate(Date now)


Copyright © 2005-2009 QOS.ch. All Rights Reserved.