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
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.concurrent.ConcurrentMap<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)
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
printOrderByDest()
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.concurrent.ConcurrentMap<Address,RpcStats.Result> 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)
-
printOrderByDest
public java.lang.String printOrderByDest()
-
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)
-
-