@InterfaceAudience.Private public abstract class OffPeakHours extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
OffPeakHours.OffPeakHoursImpl |
Modifier and Type | Field and Description |
---|---|
static OffPeakHours |
DISABLED |
private static org.apache.commons.logging.Log |
LOG |
Constructor and Description |
---|
OffPeakHours() |
Modifier and Type | Method and Description |
---|---|
static OffPeakHours |
getInstance(org.apache.hadoop.conf.Configuration conf) |
static OffPeakHours |
getInstance(int startHour,
int endHour) |
abstract boolean |
isOffPeakHour() |
abstract boolean |
isOffPeakHour(int targetHour) |
private static boolean |
isValidHour(int hour) |
private static final org.apache.commons.logging.Log LOG
public static final OffPeakHours DISABLED
public static OffPeakHours getInstance(org.apache.hadoop.conf.Configuration conf)
public static OffPeakHours getInstance(int startHour, int endHour)
startHour
- inclusiveendHour
- exclusiveprivate static boolean isValidHour(int hour)
public abstract boolean isOffPeakHour(int targetHour)
targetHour
is off-peak hourpublic abstract boolean isOffPeakHour()
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.