public final class UpstreamCheckTask
extends java.lang.Object
implements java.lang.Runnable
| Constructor and Description |
|---|
UpstreamCheckTask(int checkInterval)
Instantiates a new Upstream check task.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.concurrent.atomic.AtomicBoolean |
getCheckStarted()
get checkStarted.
|
java.util.Map<java.lang.String,java.util.List<Upstream>> |
getHealthyUpstream()
Get healthy upstream map.
|
int |
getPoolSize()
get checkThreadPoolSize.
|
java.util.Map<java.lang.String,java.util.List<Upstream>> |
getUnhealthyUpstream()
Get unhealthy upstream map.
|
void |
print()
Print healthy and unhealthy check log.
|
void |
run() |
void |
schedule()
Schedule health check task.
|
void |
setCheckTimeout(int checkTimeout)
Set check timeout.
|
void |
setHealthyThreshold(int healthyThreshold)
Set healthy threshold.
|
void |
setPoolSize(int poolSize)
set checkThreadPoolSize.
|
void |
setUnhealthyThreshold(int unhealthyThreshold)
Set unhealthy threshold.
|
void |
triggerAddOne(java.lang.String selectorId,
Upstream upstream)
Add one upstream via selectorData.
|
void |
triggerRemoveAll(java.lang.String selectorId)
Remove all upstream via selectorId.
|
void |
triggerRemoveOne(java.lang.String selectorId,
Upstream upstream)
Remove a specific upstream via selectorId.
|
public UpstreamCheckTask(int checkInterval)
checkInterval - the check intervalpublic java.util.concurrent.atomic.AtomicBoolean getCheckStarted()
public void schedule()
public void setCheckTimeout(int checkTimeout)
checkTimeout - millisecondspublic int getPoolSize()
public void setPoolSize(int poolSize)
poolSize - checkThreadPoolSizepublic void setHealthyThreshold(int healthyThreshold)
healthyThreshold - healthy thresholdpublic void setUnhealthyThreshold(int unhealthyThreshold)
unhealthyThreshold - unhealthy thresholdpublic void run()
run in interface java.lang.Runnablepublic void triggerAddOne(java.lang.String selectorId,
Upstream upstream)
selectorId - selectorIdupstream - upstreampublic void triggerRemoveOne(java.lang.String selectorId,
Upstream upstream)
selectorId - selectorIdupstream - upstreampublic void triggerRemoveAll(java.lang.String selectorId)
selectorId - selectorIdpublic void print()
public java.util.Map<java.lang.String,java.util.List<Upstream>> getHealthyUpstream()
public java.util.Map<java.lang.String,java.util.List<Upstream>> getUnhealthyUpstream()
Copyright © 2023 The Apache Software Foundation. All rights reserved.