Package org.apache.pulsar.broker
Class BundleData
- java.lang.Object
-
- org.apache.pulsar.broker.BundleData
-
public class BundleData extends java.lang.ObjectData class comprising the short term and long term historical data for this bundle.
-
-
Constructor Summary
Constructors Constructor Description BundleData()BundleData(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TimeAverageMessageDatagetLongTermData()TimeAverageMessageDatagetShortTermData()intgetTopics()voidsetLongTermData(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 Detail
-
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 Detail
-
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
public TimeAverageMessageData getShortTermData()
-
setShortTermData
public void setShortTermData(TimeAverageMessageData shortTermData)
-
getLongTermData
public TimeAverageMessageData getLongTermData()
-
setLongTermData
public void setLongTermData(TimeAverageMessageData longTermData)
-
getTopics
public int getTopics()
-
setTopics
public void setTopics(int topics)
-
-