Class RollingCalendar

java.lang.Object
java.util.Calendar
java.util.GregorianCalendar
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:
  • Constructor Details

    • RollingCalendar

      public RollingCalendar(String datePattern)
    • RollingCalendar

      public RollingCalendar(String datePattern, TimeZone tz, Locale locale)
  • Method Details

    • getPeriodicityType

      public PeriodicityType getPeriodicityType()
    • computePeriodicityType

      public PeriodicityType computePeriodicityType()
    • isCollisionFree

      public boolean isCollisionFree()
    • printPeriodicity

      public void printPeriodicity(ContextAwareBase cab)
    • periodBarriersCrossed

      public long periodBarriersCrossed(long start, long end)
    • diffInMonths

      public static int diffInMonths(long startTime, long endTime)
    • getEndOfNextNthPeriod

      public Instant getEndOfNextNthPeriod(Instant instant, int periods)
    • getNextTriggeringDate

      public Instant getNextTriggeringDate(Instant instant)
    • getStartOfCurrentPeriodWithGMTOffsetCorrection

      public long getStartOfCurrentPeriodWithGMTOffsetCorrection(long now, TimeZone timezone)