public class IpAccessStat extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
AtomicInteger |
count
这个ip访问的次数
|
AtomicInteger |
noSessionCount
不带session的访问次数
|
SetWithLock<String> |
sessionIds
这个ip下的所有sessionid
|
AtomicLong |
timeCost
这个ip访问给服务器带来的时间消耗,单位:毫秒
|
Constructor and Description |
---|
IpAccessStat(Long durationType,
String ip) |
Modifier and Type | Method and Description |
---|---|
IpPathAccessStat |
get(String path)
根据ip获取IpAccesspathStat,如果缓存中不存在,则创建
|
IpPathAccessStat |
get(String path,
boolean forceCreate)
根据ipAccessStat获取IpAccesspathStat,如果缓存中不存在,则根据forceCreate的值决定是否创建
|
long |
getDuration() |
Long |
getDurationType() |
long |
getFirstAccessTime() |
String |
getFormatedDuration() |
String |
getIp() |
MapWithLock<String,IpPathAccessStat> |
getIpPathAccessStatMap() |
long |
getLastAccessTime() |
double |
getPerSecond() |
void |
setDuration(long duration) |
void |
setDurationType(Long durationType) |
void |
setFirstAccessTime(long firstAccessTime) |
void |
setIp(String ip) |
void |
setIpPathAccessStatMap(MapWithLock<String,IpPathAccessStat> ipPathAccessStatMap) |
void |
setLastAccessTime(long lastAccessTime) |
public final SetWithLock<String> sessionIds
public final AtomicInteger count
public final AtomicLong timeCost
public final AtomicInteger noSessionCount
public long getDuration()
public void setDuration(long duration)
public IpPathAccessStat get(String path)
ipAccessStat
- path
- public IpPathAccessStat get(String path, boolean forceCreate)
ipAccessStat
- path
- forceCreate
- public MapWithLock<String,IpPathAccessStat> getIpPathAccessStatMap()
public void setIpPathAccessStatMap(MapWithLock<String,IpPathAccessStat> ipPathAccessStatMap)
public String getFormatedDuration()
public double getPerSecond()
public Long getDurationType()
public void setDurationType(Long durationType)
public String getIp()
public void setIp(String ip)
public long getFirstAccessTime()
public void setFirstAccessTime(long firstAccessTime)
public long getLastAccessTime()
public void setLastAccessTime(long lastAccessTime)
Copyright © 2021. All rights reserved.