T - the type parameterpublic abstract class AbstractDataRefresh<T> extends java.lang.Object implements DataRefresh
| Modifier and Type | Field and Description |
|---|---|
protected static java.util.concurrent.ConcurrentMap<org.apache.shenyu.common.enums.ConfigGroupEnum,org.apache.shenyu.common.dto.ConfigData<?>> |
GROUP_CACHE
The Group cache.
|
| Constructor and Description |
|---|
AbstractDataRefresh() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract com.google.gson.JsonObject |
convert(com.google.gson.JsonObject data)
Convert json object.
|
protected abstract org.apache.shenyu.common.dto.ConfigData<T> |
fromJson(com.google.gson.JsonObject data)
From json config data.
|
java.lang.Boolean |
refresh(com.google.gson.JsonObject data)
Refresh boolean.
|
protected abstract void |
refresh(java.util.List<T> data)
Refresh.
|
protected abstract boolean |
updateCacheIfNeed(org.apache.shenyu.common.dto.ConfigData<T> result)
Update cache if need boolean.
|
protected boolean |
updateCacheIfNeed(org.apache.shenyu.common.dto.ConfigData<T> newVal,
org.apache.shenyu.common.enums.ConfigGroupEnum groupEnum)
If the MD5 values are different and the last update time of the old data is less than
the last update time of the new data, the configuration cache is considered to have been changed.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcacheConfigDataprotected static final java.util.concurrent.ConcurrentMap<org.apache.shenyu.common.enums.ConfigGroupEnum,org.apache.shenyu.common.dto.ConfigData<?>> GROUP_CACHE
protected abstract com.google.gson.JsonObject convert(com.google.gson.JsonObject data)
data - the dataprotected abstract org.apache.shenyu.common.dto.ConfigData<T> fromJson(com.google.gson.JsonObject data)
data - the dataprotected abstract void refresh(java.util.List<T> data)
data - the datapublic java.lang.Boolean refresh(com.google.gson.JsonObject data)
DataRefreshrefresh in interface DataRefreshdata - the dataprotected abstract boolean updateCacheIfNeed(org.apache.shenyu.common.dto.ConfigData<T> result)
result - the resultprotected boolean updateCacheIfNeed(org.apache.shenyu.common.dto.ConfigData<T> newVal, org.apache.shenyu.common.enums.ConfigGroupEnum groupEnum)
newVal - the lasted configgroupEnum - the group enumCopyright © 2023 The Apache Software Foundation. All rights reserved.