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
ConstructorsConstructorDescriptionTimeAverageBrokerData(Set<String> bundles, Map<String, BundleData> data, org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats defaultStats) Initialize a TimeAverageBrokerData. -
Method Summary
-
Constructor Details
-
TimeAverageBrokerData
public TimeAverageBrokerData(Set<String> bundles, Map<String, BundleData> data, org.apache.pulsar.policies.data.loadbalancer.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, org.apache.pulsar.policies.data.loadbalancer.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.
-