org.springframework.jmx.support.MetricType Java Examples

The following examples show how to use org.springframework.jmx.support.MetricType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MetadataMBeanInfoAssembler.java    From spring4-understanding with Apache License 2.0 6 votes vote down vote up
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);
}
 
Example #2
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "chars")
public long getSentRenderedSize()
{
    return sentRenderedSize;
}
 
Example #3
Source File: ManagedMetric.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public void setMetricType(MetricType metricType) {
	Assert.notNull(metricType, "MetricType must not be null");
	this.metricType = metricType;
}
 
Example #4
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "ms")
public long getLastRenderTime()
{
    return lastRenderTime;
}
 
Example #5
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "ms")
public long getMaxRenderTime()
{
    return maxRenderTime;
}
 
Example #6
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "ms")
public long getRenderTime()
{
    return renderTime;
}
 
Example #7
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "chars")
public long getSavedRenderedSize()
{
    return savedRenderedSize;
}
 
Example #8
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "chars")
public long getDiffRenderedSize()
{
    return diffRenderedSize;
}
 
Example #9
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER)
public long getDiffRenderCount()
{
    return diffRenderCount;
}
 
Example #10
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER)
public long getDiffRenderAttempts()
{
    return diffRenderAttempts;
}
 
Example #11
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER, unit = "chars")
public long getFullRenderedSize()
{
    return fullRenderedSize;
}
 
Example #12
Source File: BratMetricsImpl.java    From webanno with Apache License 2.0 4 votes vote down vote up
@ManagedMetric(metricType = MetricType.COUNTER)
public long getFullRenderCount()
{
    return fullRenderCount;
}
 
Example #13
Source File: AnnotationTestBean.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@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;
}
 
Example #14
Source File: ManagedMetric.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public MetricType getMetricType() {
	return this.metricType;
}
 
Example #15
Source File: ManagedMetric.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public void setMetricType(MetricType metricType) {
	this.metricType = metricType;
}
 
Example #16
Source File: ManagedMetric.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public MetricType getMetricType() {
	return this.metricType;
}
 
Example #17
Source File: ManagedMetric.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public void setMetricType(MetricType metricType) {
	Assert.notNull(metricType, "MetricType must not be null");
	this.metricType = metricType;
}
 
Example #18
Source File: AnnotationTestBean.java    From java-technology-stack with MIT License 4 votes vote down vote up
@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;
}
 
Example #19
Source File: AnotherAnnotationTestBean.java    From java-technology-stack with MIT License 4 votes vote down vote up
@ManagedMetric(description = "a metric", metricType = MetricType.COUNTER)
int getCacheEntries();
 
Example #20
Source File: ManagedMetric.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public MetricType getMetricType() {
	return this.metricType;
}
 
Example #21
Source File: ManagedMetric.java    From java-technology-stack with MIT License 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public void setMetricType(MetricType metricType) {
	Assert.notNull(metricType, "MetricType must not be null");
	this.metricType = metricType;
}
 
Example #22
Source File: AnnotationTestBean.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@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;
}
 
Example #23
Source File: AnotherAnnotationTestBean.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@ManagedMetric(description = "a metric", metricType = MetricType.COUNTER)
int getCacheEntries();
 
Example #24
Source File: ManagedMetric.java    From spring-analysis-note with MIT License 4 votes vote down vote up
/**
 * A description of how this metric's values change over time.
 */
public MetricType getMetricType() {
	return this.metricType;
}