Class BundleData
java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.BundleData
Data class comprising the short term and long term historical data for this bundle.
-
Constructor Summary
ConstructorsConstructorDescriptionBundleData(int numShortSamples, int numLongSamples) Initialize the bundle data.BundleData(int numShortSamples, int numLongSamples, org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats defaultStats) Initialize this bundle data and have its histories default to the given stats before the first sample is received. -
Method Summary
Modifier and TypeMethodDescriptionintvoidsetLongTermData(TimeAverageMessageData longTermData) voidsetShortTermData(TimeAverageMessageData shortTermData) voidsetTopics(int topics) voidupdate(org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats newSample) Update the historical data for this bundle.
-
Constructor Details
-
BundleData
public BundleData() -
BundleData
public BundleData(int numShortSamples, int numLongSamples) Initialize the bundle data.- Parameters:
numShortSamples- Number of short term samples to use.numLongSamples- Number of long term samples to use.
-
BundleData
public BundleData(int numShortSamples, int numLongSamples, org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats defaultStats) Initialize this bundle data and have its histories default to the given stats before the first sample is received.- Parameters:
numShortSamples- Number of short term samples to use.numLongSamples- Number of long term samples to use.defaultStats- The stats to default to before the first sample is received.
-
-
Method Details
-
update
public void update(org.apache.pulsar.policies.data.loadbalancer.NamespaceBundleStats newSample) Update the historical data for this bundle.- Parameters:
newSample- The bundle stats to update this data with.
-
getShortTermData
-
setShortTermData
-
getLongTermData
-
setLongTermData
-
getTopics
public int getTopics() -
setTopics
public void setTopics(int topics)
-