public class TokenPathAccessStats extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
Map<Long,org.tio.utils.cache.caffeine.CaffeineCache> |
cacheMap
key: 时长段,单位:秒
value: CaffeineCache: key: token, value: TokenAccessStat
|
List<Long> |
durationList
时长段列表
|
| 构造器和说明 |
|---|
TokenPathAccessStats(StatPathFilter statPathFilter,
CurrUseridGetter currUseridGetter,
org.tio.core.TioConfig tioConfig,
TokenPathAccessStatListener tokenPathAccessStatListener,
Long[] durations) |
TokenPathAccessStats(StatPathFilter statPathFilter,
TokenGetter tokenGetter,
CurrUseridGetter currUseridGetter,
org.tio.core.TioConfig tioConfig,
TokenPathAccessStatListener tokenPathAccessStatListener,
Long[] durations) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addDuration(Long duration,
TokenPathAccessStatListener tokenPathAccessStatListener)
添加监控时段
|
void |
addDurations(Long[] durations,
TokenPathAccessStatListener tokenPathAccessStatListener)
添加监控时段
|
void |
clear(Long duration)
清空监控数据
|
TokenAccessStat |
get(Long duration,
String token,
String ip,
String uid)
获取TokenAccessStat
|
TokenAccessStat |
get(Long duration,
String token,
String ip,
String uid,
boolean forceCreate)
获取TokenAccessStat
|
String |
getCacheName(Long duration) |
CurrUseridGetter |
getCurrUseridGetter() |
TokenPathAccessStatListener |
getListener(Long duration) |
StatPathFilter |
getStatPathFilter() |
TokenGetter |
getTokenGetter() |
ConcurrentMap<String,Serializable> |
map(Long duration)
key: token
value: TokenPathAccessStat
|
void |
removeMonitor(Long duration)
删除监控时间段
|
void |
setCurrUseridGetter(CurrUseridGetter currUseridGetter) |
void |
setStatPathFilter(StatPathFilter statPathFilter) |
Long |
size(Long duration) |
Collection<Serializable> |
values(Long duration) |
public final Map<Long,org.tio.utils.cache.caffeine.CaffeineCache> cacheMap
public TokenPathAccessStats(StatPathFilter statPathFilter, TokenGetter tokenGetter, CurrUseridGetter currUseridGetter, org.tio.core.TioConfig tioConfig, TokenPathAccessStatListener tokenPathAccessStatListener, Long[] durations)
statPathFilter - tokenGetter - currUseridGetter - tioConfig - tokenPathAccessStatListener - durations - public TokenPathAccessStats(StatPathFilter statPathFilter, CurrUseridGetter currUseridGetter, org.tio.core.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 © 2022. All rights reserved.