• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java MetricType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.springframework.jmx.support.MetricType的典型用法代码示例。如果您正苦于以下问题:Java MetricType类的具体用法?Java MetricType怎么用?Java MetricType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



MetricType类属于org.springframework.jmx.support包,在下文中一共展示了MetricType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: populateMetricDescriptor

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
private void populateMetricDescriptor(Descriptor desc, ManagedMetric metric) {
	applyCurrencyTimeLimit(desc, metric.getCurrencyTimeLimit());

	if (StringUtils.hasLength(metric.getPersistPolicy())) {
		desc.setField(FIELD_PERSIST_POLICY, metric.getPersistPolicy());
	}
	if (metric.getPersistPeriod() >= 0) {
		desc.setField(FIELD_PERSIST_PERIOD, Integer.toString(metric.getPersistPeriod()));
	}

	if (StringUtils.hasLength(metric.getDisplayName())) {
		desc.setField(FIELD_DISPLAY_NAME, metric.getDisplayName());
	}

	if(StringUtils.hasLength(metric.getUnit())) {
		desc.setField(FIELD_UNITS, metric.getUnit());
	}

	if(StringUtils.hasLength(metric.getCategory())) {
		desc.setField(FIELD_METRIC_CATEGORY, metric.getCategory());
	}

	String metricType = (metric.getMetricType() == null) ? MetricType.GAUGE.toString() : metric.getMetricType().toString();
	desc.setField(FIELD_METRIC_TYPE, metricType);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:26,代码来源:MetadataMBeanInfoAssembler.java


示例2: populateMetricDescriptor

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
private void populateMetricDescriptor(Descriptor desc, ManagedMetric metric) {
	applyCurrencyTimeLimit(desc, metric.getCurrencyTimeLimit());

	if (StringUtils.hasLength(metric.getPersistPolicy())) {
		desc.setField(FIELD_PERSIST_POLICY, metric.getPersistPolicy());
	}
	if (metric.getPersistPeriod() >= 0) {
		desc.setField(FIELD_PERSIST_PERIOD, Integer.toString(metric.getPersistPeriod()));
	}

	if (StringUtils.hasLength(metric.getDisplayName())) {
		desc.setField(FIELD_DISPLAY_NAME, metric.getDisplayName());
	}

	if (StringUtils.hasLength(metric.getUnit())) {
		desc.setField(FIELD_UNITS, metric.getUnit());
	}

	if (StringUtils.hasLength(metric.getCategory())) {
		desc.setField(FIELD_METRIC_CATEGORY, metric.getCategory());
	}

	String metricType = (metric.getMetricType() == null) ? MetricType.GAUGE.toString() : metric.getMetricType().toString();
	desc.setField(FIELD_METRIC_TYPE, metricType);
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:26,代码来源:MetadataMBeanInfoAssembler.java


示例3: populateMetricDescriptor

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
private void populateMetricDescriptor(Descriptor desc, ManagedMetric metric) {
    applyCurrencyTimeLimit(desc, metric.getCurrencyTimeLimit());

    if (StringUtils.hasLength(metric.getPersistPolicy())) {
        desc.setField(FIELD_PERSIST_POLICY, metric.getPersistPolicy());
    }
    if (metric.getPersistPeriod() >= 0) {
        desc.setField(FIELD_PERSIST_PERIOD, Integer.toString(metric.getPersistPeriod()));
    }

    if (StringUtils.hasLength(metric.getDisplayName())) {
        desc.setField(FIELD_DISPLAY_NAME, metric.getDisplayName());
    }

    if (StringUtils.hasLength(metric.getUnit())) {
        desc.setField(FIELD_UNITS, metric.getUnit());
    }

    if (StringUtils.hasLength(metric.getCategory())) {
        desc.setField(FIELD_METRIC_CATEGORY, metric.getCategory());
    }

    String metricType = (metric.getMetricType() == null) ? MetricType.GAUGE.toString() : metric.getMetricType().toString();
    desc.setField(FIELD_METRIC_TYPE, metricType);
}
 
开发者ID:cuba-platform,项目名称:cuba,代码行数:26,代码来源:AnnotationMBeanInfoAssembler.java


示例4: getAfnemerBericht

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft het afnemer bericht.
 * @return afnemer bericht
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal berichten dat geplaatst is op afnemer queues",
        description = "Aantal berichten dat geplaatst is op afnemer queues",
        metricType = MetricType.COUNTER, unit = UNIT_BERICHTEN)
public final int getAfnemerBericht() {
    return afnemerBericht.get();
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:MaakberichtMutatieLeveringInfoBean.java


示例5: getAantal

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft het aantal handelingen.
 * @return het aantal handelingen
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal handelingen",
        description = "Aantal handelingen",
        metricType = MetricType.COUNTER, unit = UNIT_BERICHTEN)
public final int getAantal() {
    return aantalHandelingen.get();
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:MaakberichtMutatieLeveringInfoBean.java


示例6: getGemiddeldeTijdPerHandeling

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft gemiddelde tijd per handeling.
 * @return gemiddelde tijd per handeling
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Gemiddelde doorlooptijd per handeling",
        description = "Gemiddelde doorlooptijd per handeling",
        metricType = MetricType.GAUGE, unit = UNIT_BERICHTEN)
public final int getGemiddeldeTijdPerHandeling() {
    return (int) (handelingenTijd.get() / aantalHandelingen.get());
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:MaakberichtMutatieLeveringInfoBean.java


示例7: getHandelingenPerSeconde

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft aantal handelingen per seconde.
 * @return aantal handelingen per seconde
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal handelingen per seconde systeemtijd",
        description = "Aantal handelingen per seconde",
        metricType = MetricType.GAUGE, unit = UNIT_BERICHTEN)
public final double getHandelingenPerSeconde() {
    final long looptijd = System.currentTimeMillis() - start;
    return ((double) aantalHandelingen.get() / looptijd) * DUIZEND;
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:12,代码来源:MaakberichtMutatieLeveringInfoBean.java


示例8: getAfnemerBerichtenPerSeconde

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft aantal afnemer berichten per seconde.
 * @return aantal afnemer berichten per seconde
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal afnemerberichten per seconde systeemtijd",
        description = "Aantal afnemerberichten per seconde",
        metricType = MetricType.GAUGE, unit = UNIT_BERICHTEN)
public final double getAfnemerBerichtenPerSeconde() {
    final long looptijd = System.currentTimeMillis() - start;
    return ((double) afnemerBericht.get() / looptijd) * DUIZEND;
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:12,代码来源:MaakberichtMutatieLeveringInfoBean.java


示例9: getAfnemerBericht

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft het afnemer bericht.
 * @return afnemer bericht
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal berichten dat geplaatst is op afnemer queues",
        description = "Aantal berichten dat geplaatst is op afnemer queues",
        metricType = MetricType.COUNTER, unit = UNIT_BERICHTEN)
final int getAfnemerBericht() {
    return afnemerBericht.get();
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:MutatieLeveringInfoBean.java


示例10: getAantal

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft het aantal handelingen.
 * @return het aantal handelingen
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal handelingen",
        description = "Aantal handelingen",
        metricType = MetricType.COUNTER, unit = UNIT_BERICHTEN)
final int getAantal() {
    return aantalHandelingen.get();
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:MutatieLeveringInfoBean.java


示例11: getGemiddeldeTijdPerHandeling

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft gemiddelde tijd per handeling.
 * @return gemiddelde tijd per handeling
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Gemiddelde doorlooptijd per handeling",
        description = "Gemiddelde doorlooptijd per handeling",
        metricType = MetricType.GAUGE, unit = UNIT_BERICHTEN)
final int getGemiddeldeTijdPerHandeling() {
    return (int) (handelingenTijd.get() / aantalHandelingen.get());
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:11,代码来源:MutatieLeveringInfoBean.java


示例12: getHandelingenPerSeconde

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft aantal handelingen per seconde.
 * @return aantal handelingen per seconde
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal handelingen per seconde systeemtijd",
        description = "Aantal handelingen per seconde",
        metricType = MetricType.GAUGE, unit = UNIT_BERICHTEN)
final double getHandelingenPerSeconde() {
    final long looptijd = System.currentTimeMillis() - start;
    return ((double) aantalHandelingen.get() / looptijd) * DUIZEND;
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:12,代码来源:MutatieLeveringInfoBean.java


示例13: getAfnemerBerichtenPerSeconde

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Geeft aantal afnemer berichten per seconde.
 * @return aantal afnemer berichten per seconde
 */
@ManagedMetric(category = CATEGORIE_METRIEKEN, displayName = "Aantal afnemerberichten per seconde systeemtijd",
        description = "Aantal afnemerberichten per seconde",
        metricType = MetricType.GAUGE, unit = UNIT_BERICHTEN)
final double getAfnemerBerichtenPerSeconde() {
    final long looptijd = System.currentTimeMillis() - start;
    return ((double) afnemerBericht.get() / looptijd) * DUIZEND;
}
 
开发者ID:MinBZK,项目名称:OperatieBRP,代码行数:12,代码来源:MutatieLeveringInfoBean.java


示例14: getInToOutRatio

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Returns the computed in count to out count ratio
 * @return the computed in count to out count ratio
 */
@ManagedMetric(description="The computed in count to out count ratio", metricType=MetricType.GAUGE, category="MetricStreamNode", displayName="Messages")
public double getInToOutRatio() {
	final double in = inboundCount.longValue();
	final double out = outboundCount.longValue();
	if(in==0D || out==0D) return 0D;
	return in/out;
}
 
开发者ID:nickman,项目名称:HeliosStreams,代码行数:12,代码来源:AbstractMetricStreamNode.java


示例15: setMetricType

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * A description of how this metric's values change over time.
 */
public void setMetricType(MetricType metricType) {
	this.metricType = metricType;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:ManagedMetric.java


示例16: getMetricType

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * A description of how this metric's values change over time.
 */
public MetricType getMetricType() {
	return this.metricType;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:7,代码来源:ManagedMetric.java


示例17: getQueueSize

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
@ManagedMetric(description="The QueueSize metric", currencyTimeLimit = 20, persistPolicy="OnUpdate", persistPeriod=300,
		category="utilization", metricType = MetricType.COUNTER, displayName="Queue Size", unit="messages")
public long getQueueSize() {
	return 100l;
}
 
开发者ID:langtianya,项目名称:spring4-understanding,代码行数:6,代码来源:AnnotationTestBean.java


示例18: getAverageLoadPenalty

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Returns the average time spent loading new values.
 * @return the average time spent loading new values.
 */
@ManagedMetric(category="NodeConfiguration", description="The average time spent loading new values", metricType=MetricType.GAUGE, unit="ns.")
public double getAverageLoadPenalty() {
	return configCacheStats.getValue().averageLoadPenalty();
}
 
开发者ID:nickman,项目名称:HeliosStreams,代码行数:9,代码来源:NodeConfigurationServer.java


示例19: getHitCount

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Returns the cache hit count
 * @return the cache hit count
 */
@ManagedMetric(category="NodeConfiguration", description="The cache hit count", metricType=MetricType.COUNTER, unit="cache-hits")
public long getHitCount() {
	return configCacheStats.getValue().hitCount();
}
 
开发者ID:nickman,项目名称:HeliosStreams,代码行数:9,代码来源:NodeConfigurationServer.java


示例20: getMissCount

import org.springframework.jmx.support.MetricType; //导入依赖的package包/类
/**
 * Returns the cache miss count
 * @return the cache miss count
 */
@ManagedMetric(category="NodeConfiguration", description="The cache miss count", metricType=MetricType.COUNTER, unit="cache-misses")
public long getMissCount() {
	return configCacheStats.getValue().missCount();
}
 
开发者ID:nickman,项目名称:HeliosStreams,代码行数:9,代码来源:NodeConfigurationServer.java



注:本文中的org.springframework.jmx.support.MetricType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java StoredMap类代码示例发布时间:2022-05-22
下一篇:
Java ODatabaseDocumentInternal类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap