public final class FaultInjectionUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static Fault |
getFault(String key,
FaultInjectionPolicy policy) |
static AtomicLong |
getOperMetTotalReq(String key)
Returns total requests per provider for operational level.
|
static FaultParam |
initFaultParam(String key) |
static boolean |
isFaultNeedToInject(long reqCount,
int percentage)
It will check the delay/abort condition based on request count and percentage
received.
|
public static AtomicLong getOperMetTotalReq(String key)
key - transport+operational namepublic static boolean isFaultNeedToInject(long reqCount,
int percentage)
reqCount - total request count of the uripercentage - the percentage of hitting fault injectionpublic static Fault getFault(String key, FaultInjectionPolicy policy)
public static FaultParam initFaultParam(String key)
Copyright © 2017–2022 The Apache Software Foundation. All rights reserved.