public class TokenPathAccessStats extends Object
| Modifier and Type | Field and Description |
|---|---|
Map<Long,CaffeineCache> |
cacheMap
key: 时长段,单位:秒
value: CaffeineCache: key: token, value: TokenAccessStat
|
List<Long> |
durationList
时长段列表
|
| Constructor and Description |
|---|
TokenPathAccessStats(StatPathFilter statPathFilter,
CurrUseridGetter currUseridGetter,
TioConfig tioConfig,
TokenPathAccessStatListener tokenPathAccessStatListener,
Long[] durations) |
TokenPathAccessStats(StatPathFilter statPathFilter,
TokenGetter tokenGetter,
CurrUseridGetter currUseridGetter,
TioConfig tioConfig,
TokenPathAccessStatListener tokenPathAccessStatListener,
Long[] durations) |
public final Map<Long,CaffeineCache> cacheMap
public TokenPathAccessStats(StatPathFilter statPathFilter, TokenGetter tokenGetter, CurrUseridGetter currUseridGetter, TioConfig tioConfig, TokenPathAccessStatListener tokenPathAccessStatListener, Long[] durations)
statPathFilter - tokenGetter - currUseridGetter - tioConfig - tokenPathAccessStatListener - durations - public TokenPathAccessStats(StatPathFilter statPathFilter, CurrUseridGetter currUseridGetter, TioConfig tioConfig, TokenPathAccessStatListener tokenPathAccessStatListener, Long[] durations)
public void addDuration(Long duration, TokenPathAccessStatListener tokenPathAccessStatListener)
duration - 单位:秒tokenPathAccessStatListener - 可以为nullpublic TokenPathAccessStatListener getListener(Long duration)
duration - public void addDurations(Long[] durations, TokenPathAccessStatListener tokenPathAccessStatListener)
durations - 单位:秒tokenPathAccessStatListener - 可以为nullpublic void removeMonitor(Long duration)
duration - public void clear(Long duration)
public TokenAccessStat get(Long duration, String token, String ip, String uid, boolean forceCreate)
duration - token - ip - uid - forceCreate - public TokenAccessStat get(Long duration, String token, String ip, String uid)
duration - token - ip - uid - public ConcurrentMap<String,Serializable> map(Long duration)
duration - public Collection<Serializable> values(Long duration)
public TokenGetter getTokenGetter()
public CurrUseridGetter getCurrUseridGetter()
public void setCurrUseridGetter(CurrUseridGetter currUseridGetter)
public StatPathFilter getStatPathFilter()
public void setStatPathFilter(StatPathFilter statPathFilter)
Copyright © 2021. All rights reserved.