Class TimeAverageBrokerData
java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.TimeAverageBrokerData
Data class aggregating the short term and long term data across all bundles belonging to a broker.
-
Constructor Summary
ConstructorDescriptionTimeAverageBrokerData
(Set<String> bundles, Map<String, BundleData> data, NamespaceBundleStats defaultStats) Initialize a TimeAverageBrokerData. -
Method Summary
Modifier and TypeMethodDescriptionvoid
reset
(Set<String> bundles, Map<String, BundleData> data, NamespaceBundleStats defaultStats) Reuse this TimeAverageBrokerData using new data.
-
Constructor Details
-
TimeAverageBrokerData
public TimeAverageBrokerData(Set<String> bundles, Map<String, BundleData> data, NamespaceBundleStats defaultStats) Initialize a TimeAverageBrokerData.- Parameters:
bundles
- The bundles belonging to the broker.data
- Map from bundle names to the data for that bundle.defaultStats
- The stats to use when a bundle belonging to this broker is not found in the bundle data map.
-
-
Method Details
-
reset
public void reset(Set<String> bundles, Map<String, BundleData> data, NamespaceBundleStats defaultStats) Reuse this TimeAverageBrokerData using new data.- Parameters:
bundles
- The bundles belonging to the broker.data
- Map from bundle names to the data for that bundle.defaultStats
- The stats to use when a bundle belonging to this broker is not found in the bundle data map.
-