Class BroadCastStatsLogger
- java.lang.Object
-
- org.apache.bookkeeper.common.stats.BroadCastStatsLogger
-
public class BroadCastStatsLogger extends java.lang.Object
Stats Loggers that broadcast stats to multipleStatsLogger
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
BroadCastStatsLogger.MasterSlave
(package private) static class
BroadCastStatsLogger.Two
-
Constructor Summary
Constructors Constructor Description BroadCastStatsLogger()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StatsLogger
masterslave(StatsLogger master, StatsLogger slave)
Create a broadcast stats logger of two stats loggersmaster
andslave
.static StatsLogger
two(StatsLogger first, StatsLogger second)
Create a broadcast stats logger of two stats loggers `first
` and `second
`.
-
-
-
Method Detail
-
two
public static StatsLogger two(StatsLogger first, StatsLogger second)
Create a broadcast stats logger of two stats loggers `first
` and `second
`. The returned stats logger doesn't allow registering anyGauge
.- Parameters:
first
- first stats loggersecond
- second stats logger- Returns:
- broadcast stats logger
-
masterslave
public static StatsLogger masterslave(StatsLogger master, StatsLogger slave)
Create a broadcast stats logger of two stats loggersmaster
andslave
. It is similar astwo(StatsLogger, StatsLogger)
, but it allows registeringGauge
s. TheGauge
will be registered under master.- Parameters:
master
- master stats logger to receiveCounter
,OpStatsLogger
andGauge
.slave
- slave stats logger to receive onlyCounter
andOpStatsLogger
.- Returns:
- broadcast stats logger
-
-