@InterfaceAudience.Private public class HBaseServerExceptionPauseManager extends Object
Modifier and Type | Field and Description |
---|---|
private static org.slf4j.Logger |
LOG |
private long |
pauseNs |
private long |
pauseNsForServerOverloaded |
private long |
timeoutNs |
Constructor and Description |
---|
HBaseServerExceptionPauseManager(long pauseNs,
long pauseNsForServerOverloaded,
long timeoutNs) |
Modifier and Type | Method and Description |
---|---|
OptionalLong |
getPauseNsFromException(Throwable error,
int tries,
long startNs)
Returns the nanos, if any, for which the client should wait
|
long |
remainingTimeNs(long startNs) |
private static final org.slf4j.Logger LOG
private final long pauseNs
private final long pauseNsForServerOverloaded
private final long timeoutNs
public HBaseServerExceptionPauseManager(long pauseNs, long pauseNsForServerOverloaded, long timeoutNs)
public OptionalLong getPauseNsFromException(Throwable error, int tries, long startNs)
error
- The exception from the servertries
- The current retry countpublic long remainingTimeNs(long startNs)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.