Class LoadReport
java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.LoadReport
- All Implemented Interfaces:
LoadManagerReport,ServiceLookupData
This class represents the overall load of the broker - it includes overall
SystemResourceUsage and
NamespaceUsage for all the namespaces hosted by this broker.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLoadReport(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls) -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubledoubledoubledoubledoublegetCpu()longdoubledoubledoubledoublegetName()intintintintdoubledoubledoubledoubledoubledoublegetProtocol(String protocol) longlongbooleanbooleanbooleanbooleanvoidsetAllocatedBandwidthIn(double allocatedBandwidthIn) voidsetAllocatedBandwidthOut(double allocatedBandwidthOut) voidsetAllocatedCPU(double allocatedCPU) voidsetAllocatedMemory(double allocatedMemory) voidsetAllocatedMsgRateIn(double allocatedMsgRateIn) voidsetAllocatedMsgRateOut(double allocatedMsgRateOut) voidsetBrokerVersionString(String brokerVersionString) voidsetBundleGains(Set<String> bundleGains) voidsetBundleLosses(Set<String> bundleLosses) voidsetBundleStats(Map<String, NamespaceBundleStats> stats) voidsetLoadManagerClassName(String loadManagerClassName) voidvoidsetNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled) voidsetOverLoaded(boolean isOverLoaded) voidsetPersistentTopicsEnabled(boolean persistentTopicsEnabled) voidsetPreAllocatedBandwidthIn(double preAllocatedBandwidthIn) voidsetPreAllocatedBandwidthOut(double preAllocatedBandwidthOut) voidsetPreAllocatedCPU(double preAllocatedCPU) voidsetPreAllocatedMemory(double preAllocatedMemory) voidsetPreAllocatedMsgRateIn(double preAllocatedMsgRateIn) voidsetPreAllocatedMsgRateOut(double preAllocatedMsgRateOut) voidsetProtocols(Map<String, String> protocols) voidsetStartTimestamp(long startTimestamp) voidsetSystemResourceUsage(SystemResourceUsage systemResourceUsage) voidsetTimestamp(long timestamp) voidsetUnderLoaded(boolean isUnderLoaded)
-
Field Details
-
loadReportType
-
-
Constructor Details
-
LoadReport
public LoadReport() -
LoadReport
-
-
Method Details
-
setBundleStats
-
getBundleStats
- Specified by:
getBundleStatsin interfaceLoadManagerReport
-
getName
-
setName
-
getSystemResourceUsage
-
setSystemResourceUsage
-
isUnderLoaded
public boolean isUnderLoaded() -
setUnderLoaded
public void setUnderLoaded(boolean isUnderLoaded) -
isOverLoaded
public boolean isOverLoaded() -
getBottleneckResourceType
-
setOverLoaded
public void setOverLoaded(boolean isOverLoaded) -
getTimestamp
public long getTimestamp() -
setTimestamp
public void setTimestamp(long timestamp) -
getMsgRateIn
public double getMsgRateIn()- Specified by:
getMsgRateInin interfaceLoadManagerReport
-
getMsgRateOut
public double getMsgRateOut()- Specified by:
getMsgRateOutin interfaceLoadManagerReport
-
getLoadReportType
-
getNumTopics
public int getNumTopics()- Specified by:
getNumTopicsin interfaceLoadManagerReport
-
getNumConsumers
public int getNumConsumers()- Specified by:
getNumConsumersin interfaceLoadManagerReport
-
getNumProducers
public int getNumProducers()- Specified by:
getNumProducersin interfaceLoadManagerReport
-
getNumBundles
public int getNumBundles()- Specified by:
getNumBundlesin interfaceLoadManagerReport
-
getBundles
-
getSortedBundleStats
public TreeMap<String,NamespaceBundleStats> getSortedBundleStats(SystemResourceUsage.ResourceType resType) -
getBundleGains
-
setBundleGains
-
getBundleLosses
-
setBundleLosses
-
getAllocatedCPU
public double getAllocatedCPU() -
setAllocatedCPU
public void setAllocatedCPU(double allocatedCPU) -
getAllocatedMemory
public double getAllocatedMemory() -
setAllocatedMemory
public void setAllocatedMemory(double allocatedMemory) -
getAllocatedBandwidthIn
public double getAllocatedBandwidthIn() -
setAllocatedBandwidthIn
public void setAllocatedBandwidthIn(double allocatedBandwidthIn) -
getAllocatedBandwidthOut
public double getAllocatedBandwidthOut() -
setAllocatedBandwidthOut
public void setAllocatedBandwidthOut(double allocatedBandwidthOut) -
getAllocatedMsgRateIn
public double getAllocatedMsgRateIn() -
setAllocatedMsgRateIn
public void setAllocatedMsgRateIn(double allocatedMsgRateIn) -
getAllocatedMsgRateOut
public double getAllocatedMsgRateOut() -
setAllocatedMsgRateOut
public void setAllocatedMsgRateOut(double allocatedMsgRateOut) -
getPreAllocatedCPU
public double getPreAllocatedCPU() -
setPreAllocatedCPU
public void setPreAllocatedCPU(double preAllocatedCPU) -
getPreAllocatedMemory
public double getPreAllocatedMemory() -
setPreAllocatedMemory
public void setPreAllocatedMemory(double preAllocatedMemory) -
getPreAllocatedBandwidthIn
public double getPreAllocatedBandwidthIn() -
setPreAllocatedBandwidthIn
public void setPreAllocatedBandwidthIn(double preAllocatedBandwidthIn) -
getPreAllocatedBandwidthOut
public double getPreAllocatedBandwidthOut() -
setPreAllocatedBandwidthOut
public void setPreAllocatedBandwidthOut(double preAllocatedBandwidthOut) -
getPreAllocatedMsgRateIn
public double getPreAllocatedMsgRateIn() -
setPreAllocatedMsgRateIn
public void setPreAllocatedMsgRateIn(double preAllocatedMsgRateIn) -
getPreAllocatedMsgRateOut
public double getPreAllocatedMsgRateOut() -
setPreAllocatedMsgRateOut
public void setPreAllocatedMsgRateOut(double preAllocatedMsgRateOut) -
setBrokerVersionString
-
getBrokerVersionString
- Specified by:
getBrokerVersionStringin interfaceLoadManagerReport
-
getWebServiceUrl
- Specified by:
getWebServiceUrlin interfaceServiceLookupData
-
getWebServiceUrlTls
- Specified by:
getWebServiceUrlTlsin interfaceServiceLookupData
-
getPulsarServiceUrl
- Specified by:
getPulsarServiceUrlin interfaceServiceLookupData
-
getPulsarServiceUrlTls
- Specified by:
getPulsarServiceUrlTlsin interfaceServiceLookupData
-
isPersistentTopicsEnabled
public boolean isPersistentTopicsEnabled()- Specified by:
isPersistentTopicsEnabledin interfaceLoadManagerReport
-
setPersistentTopicsEnabled
public void setPersistentTopicsEnabled(boolean persistentTopicsEnabled) -
isNonPersistentTopicsEnabled
public boolean isNonPersistentTopicsEnabled()- Specified by:
isNonPersistentTopicsEnabledin interfaceLoadManagerReport
-
setNonPersistentTopicsEnabled
public void setNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled) -
getCpu
- Specified by:
getCpuin interfaceLoadManagerReport
-
getMemory
- Specified by:
getMemoryin interfaceLoadManagerReport
-
getDirectMemory
- Specified by:
getDirectMemoryin interfaceLoadManagerReport
-
getBandwidthIn
- Specified by:
getBandwidthInin interfaceLoadManagerReport
-
getBandwidthOut
- Specified by:
getBandwidthOutin interfaceLoadManagerReport
-
getLastUpdate
public long getLastUpdate()- Specified by:
getLastUpdatein interfaceLoadManagerReport
-
getMsgThroughputIn
public double getMsgThroughputIn()- Specified by:
getMsgThroughputInin interfaceLoadManagerReport
-
getMsgThroughputOut
public double getMsgThroughputOut()- Specified by:
getMsgThroughputOutin interfaceLoadManagerReport
-
getProtocols
- Specified by:
getProtocolsin interfaceServiceLookupData
-
setProtocols
-
getProtocol
- Specified by:
getProtocolin interfaceServiceLookupData
-
getLoadManagerClassName
- Specified by:
getLoadManagerClassNamein interfaceServiceLookupData
-
setLoadManagerClassName
-
getStartTimestamp
public long getStartTimestamp()- Specified by:
getStartTimestampin interfaceServiceLookupData
-
setStartTimestamp
public void setStartTimestamp(long startTimestamp)
-