Class BundleData


  • public class BundleData
    extends java.lang.Object
    Data class comprising the short term and long term 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.
      • getTopics

        public int getTopics()
      • setTopics

        public void setTopics​(int topics)