类 LocalBrokerData
java.lang.Object
org.apache.pulsar.policies.data.loadbalancer.LocalBrokerData
- 所有已实现的接口:
LoadManagerReport,ServiceLookupData
Contains all the data that is maintained locally on each broker.
-
字段概要
字段 -
构造器概要
构造器构造器说明LocalBrokerData(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls) Broker data constructor which takes in four URLs to satisfy the contract of ServiceLookupData.LocalBrokerData(String webServiceUrl, String webServiceUrlTls, String pulsarServiceUrl, String pulsarServiceUrlTls, Map<String, AdvertisedListener> advertisedListeners) -
方法概要
修饰符和类型方法说明voidbooleanSince the broker data is also used as a lock for the broker, we need to have a stable comparison operator that is not affected by the actual load on the broker.getCpu()longdoubledoublegetMaxResourceUsageWithWeight(double cpuWeight, double directMemoryWeight, double bandwidthInWeight, double bandwidthOutWeight) doublegetMaxResourceUsageWithWeight(double cpuWeight, double memoryWeight, double directMemoryWeight, double bandwidthInWeight, double bandwidthOutWeight) 已过时。doubledoubledoubledoubleintintintlonggetProtocol(String protocol) longinthashCode()booleanbooleanstatic doublemax(double... args) voidsetAdvertisedListeners(Map<String, AdvertisedListener> advertisedListeners) voidsetBandwidthIn(ResourceUsage bandwidthIn) voidsetBandwidthOut(ResourceUsage bandwidthOut) voidsetBrokerVersionString(String brokerVersionString) voidsetBundles(Set<String> bundles) voidsetCpu(ResourceUsage cpu) voidsetDirectMemory(ResourceUsage directMemory) voidsetLastBundleGains(Set<String> lastBundleGains) voidsetLastBundleLosses(Set<String> lastBundleLosses) voidsetLastStats(Map<String, NamespaceBundleStats> lastStats) voidsetLastUpdate(long lastUpdate) voidsetLoadManagerClassName(String loadManagerClassName) voidsetMemory(ResourceUsage memory) voidsetMsgRateIn(double msgRateIn) voidsetMsgRateOut(double msgRateOut) voidsetMsgThroughputIn(double msgThroughputIn) voidsetMsgThroughputOut(double msgThroughputOut) voidsetNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled) voidsetNumBundles(int numBundles) voidsetNumConsumers(int numConsumers) voidsetNumProducers(int numProducers) voidsetNumTopics(int numTopics) voidsetPersistentTopicsEnabled(boolean persistentTopicsEnabled) voidsetProtocols(Map<String, String> protocols) voidupdate(LocalBrokerData other) Using another LocalBrokerData, update this.voidupdate(SystemResourceUsage systemResourceUsage, Map<String, NamespaceBundleStats> bundleStats) Using the system resource usage and bundle stats acquired from the Pulsar client, update this LocalBrokerData.
-
字段详细资料
-
loadReportType
-
-
构造器详细资料
-
方法详细资料
-
equals
Since the broker data is also used as a lock for the broker, we need to have a stable comparison operator that is not affected by the actual load on the broker. -
hashCode
public int hashCode() -
update
public void update(SystemResourceUsage systemResourceUsage, Map<String, NamespaceBundleStats> bundleStats) Using the system resource usage and bundle stats acquired from the Pulsar client, update this LocalBrokerData.- 参数:
systemResourceUsage- System resource usage (cpu, memory, and direct memory).bundleStats- The bundle stats retrieved from the Pulsar client.
-
update
Using another LocalBrokerData, update this.- 参数:
other- LocalBrokerData to update from.
-
getMaxResourceUsage
public double getMaxResourceUsage() -
printResourceUsage
-
getMaxResourceUsageWithWeight
@Deprecated public double getMaxResourceUsageWithWeight(double cpuWeight, double memoryWeight, double directMemoryWeight, double bandwidthInWeight, double bandwidthOutWeight) 已过时。 -
getMaxResourceUsageWithWeight
public double getMaxResourceUsageWithWeight(double cpuWeight, double directMemoryWeight, double bandwidthInWeight, double bandwidthOutWeight) -
max
public static double max(double... args) -
getLoadReportType
-
getCpu
- 指定者:
getCpu在接口中LoadManagerReport
-
setCpu
-
getMemory
- 指定者:
getMemory在接口中LoadManagerReport
-
setMemory
-
getDirectMemory
- 指定者:
getDirectMemory在接口中LoadManagerReport
-
setDirectMemory
-
getBandwidthIn
- 指定者:
getBandwidthIn在接口中LoadManagerReport
-
setBandwidthIn
-
getBandwidthOut
- 指定者:
getBandwidthOut在接口中LoadManagerReport
-
setBandwidthOut
-
getLastBundleGains
-
cleanDeltas
public void cleanDeltas() -
setLastBundleGains
-
getLastBundleLosses
-
setLastBundleLosses
-
getLastUpdate
public long getLastUpdate()- 指定者:
getLastUpdate在接口中LoadManagerReport
-
setLastUpdate
public void setLastUpdate(long lastUpdate) -
getBundles
-
setBundles
-
getLastStats
-
setLastStats
-
getNumTopics
public long getNumTopics()- 指定者:
getNumTopics在接口中LoadManagerReport
-
setNumTopics
public void setNumTopics(int numTopics) -
getNumBundles
public int getNumBundles()- 指定者:
getNumBundles在接口中LoadManagerReport
-
setNumBundles
public void setNumBundles(int numBundles) -
getNumConsumers
public int getNumConsumers()- 指定者:
getNumConsumers在接口中LoadManagerReport
-
setNumConsumers
public void setNumConsumers(int numConsumers) -
getNumProducers
public int getNumProducers()- 指定者:
getNumProducers在接口中LoadManagerReport
-
setNumProducers
public void setNumProducers(int numProducers) -
getMsgThroughputIn
public double getMsgThroughputIn()- 指定者:
getMsgThroughputIn在接口中LoadManagerReport
-
setMsgThroughputIn
public void setMsgThroughputIn(double msgThroughputIn) -
getMsgThroughputOut
public double getMsgThroughputOut()- 指定者:
getMsgThroughputOut在接口中LoadManagerReport
-
setMsgThroughputOut
public void setMsgThroughputOut(double msgThroughputOut) -
getMsgRateIn
public double getMsgRateIn()- 指定者:
getMsgRateIn在接口中LoadManagerReport
-
setMsgRateIn
public void setMsgRateIn(double msgRateIn) -
getMsgRateOut
public double getMsgRateOut()- 指定者:
getMsgRateOut在接口中LoadManagerReport
-
setMsgRateOut
public void setMsgRateOut(double msgRateOut) -
setBrokerVersionString
-
getBrokerVersionString
- 指定者:
getBrokerVersionString在接口中LoadManagerReport
-
getWebServiceUrl
- 指定者:
getWebServiceUrl在接口中ServiceLookupData
-
getWebServiceUrlTls
- 指定者:
getWebServiceUrlTls在接口中ServiceLookupData
-
getPulsarServiceUrl
- 指定者:
getPulsarServiceUrl在接口中ServiceLookupData
-
getPulsarServiceUrlTls
- 指定者:
getPulsarServiceUrlTls在接口中ServiceLookupData
-
isPersistentTopicsEnabled
public boolean isPersistentTopicsEnabled()- 指定者:
isPersistentTopicsEnabled在接口中LoadManagerReport
-
setPersistentTopicsEnabled
public void setPersistentTopicsEnabled(boolean persistentTopicsEnabled) -
isNonPersistentTopicsEnabled
public boolean isNonPersistentTopicsEnabled() -
setNonPersistentTopicsEnabled
public void setNonPersistentTopicsEnabled(boolean nonPersistentTopicsEnabled) -
getBundleStats
- 指定者:
getBundleStats在接口中LoadManagerReport
-
setProtocols
-
getProtocols
- 指定者:
getProtocols在接口中ServiceLookupData
-
getProtocol
- 指定者:
getProtocol在接口中ServiceLookupData
-
getAdvertisedListeners
-
setAdvertisedListeners
-
getLoadManagerClassName
- 指定者:
getLoadManagerClassName在接口中ServiceLookupData
-
setLoadManagerClassName
-
getStartTimestamp
public long getStartTimestamp()- 指定者:
getStartTimestamp在接口中ServiceLookupData
-