@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.slf4j.Logger |
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.slf4j.Logger LOG
public static final OffPeakHours DISABLED
public OffPeakHours()
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.