Package org.jgroups.util
Class RpcStats
- java.lang.Object
-
- org.jgroups.util.RpcStats
-
public class RpcStats extends java.lang.Object
Keeps track of stats for sync and async unicasts and multicasts- Since:
- 3.6.8
- Author:
- Bela Ban
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
RpcStats.Result
protected static class
RpcStats.RTTStat
static class
RpcStats.Type
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.atomic.AtomicInteger
async_anycasts
protected java.util.concurrent.atomic.AtomicInteger
async_multicasts
protected java.util.concurrent.atomic.AtomicInteger
async_unicasts
protected java.util.Map<Address,RpcStats.RTTStat>
rtt_stats
protected java.util.Map<Address,RpcStats.Result>
stats
protected java.util.concurrent.atomic.AtomicInteger
sync_anycasts
protected java.util.concurrent.atomic.AtomicInteger
sync_multicasts
protected java.util.concurrent.atomic.AtomicInteger
sync_unicasts
-
Constructor Summary
Constructors Constructor Description RpcStats(boolean extended_stats)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(RpcStats.Type type, Address dest, boolean sync, long time)
void
addAnycast(boolean sync, long time, java.util.Collection<Address> dests)
void
addRTTStats(Address sender, RTTHeader hdr)
protected void
addToResults(Address dest, boolean sync, long time)
int
anycasts(boolean sync)
boolean
extendedStats()
RpcStats
extendedStats(boolean f)
int
multicasts(boolean sync)
java.lang.String
printRTTStatsByDest()
java.lang.String
printStatsByDest()
void
reset()
void
retainAll(java.util.Collection<Address> members)
java.lang.String
toString()
int
unicasts(boolean sync)
protected void
update(RpcStats.Type type, boolean sync)
-
-
-
Field Detail
-
sync_unicasts
protected final java.util.concurrent.atomic.AtomicInteger sync_unicasts
-
async_unicasts
protected final java.util.concurrent.atomic.AtomicInteger async_unicasts
-
sync_multicasts
protected final java.util.concurrent.atomic.AtomicInteger sync_multicasts
-
async_multicasts
protected final java.util.concurrent.atomic.AtomicInteger async_multicasts
-
sync_anycasts
protected final java.util.concurrent.atomic.AtomicInteger sync_anycasts
-
async_anycasts
protected final java.util.concurrent.atomic.AtomicInteger async_anycasts
-
stats
protected volatile java.util.Map<Address,RpcStats.Result> stats
-
rtt_stats
protected volatile java.util.Map<Address,RpcStats.RTTStat> rtt_stats
-
-
Method Detail
-
unicasts
public int unicasts(boolean sync)
-
multicasts
public int multicasts(boolean sync)
-
anycasts
public int anycasts(boolean sync)
-
extendedStats
public boolean extendedStats()
-
extendedStats
public RpcStats extendedStats(boolean f)
-
reset
public void reset()
-
add
public void add(RpcStats.Type type, Address dest, boolean sync, long time)
-
addAnycast
public void addAnycast(boolean sync, long time, java.util.Collection<Address> dests)
-
retainAll
public void retainAll(java.util.Collection<Address> members)
-
printStatsByDest
public java.lang.String printStatsByDest()
-
printRTTStatsByDest
public java.lang.String printRTTStatsByDest()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
update
protected void update(RpcStats.Type type, boolean sync)
-
addToResults
protected void addToResults(Address dest, boolean sync, long time)
-
-