Skip to content

Commit

Permalink
Merge pull request #243 from dmuino/servo06
Browse files Browse the repository at this point in the history
Update servo to 0.6
  • Loading branch information
benjchristensen committed Apr 15, 2014
2 parents 0494949 + 65c99c0 commit a9b432d
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apply plugin: 'idea'

dependencies {
compile project(':hystrix-core')
compile 'com.netflix.servo:servo-core:0.4.32'
compile 'com.netflix.servo:servo-core:0.6.+'
}

eclipse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,29 @@ protected abstract class InformationalMetric<K> extends AbstractMonitor<K> {
public InformationalMetric(MonitorConfig config) {
super(config.withAdditionalTag(DataSourceType.INFORMATIONAL).withAdditionalTag(getServoTypeTag()).withAdditionalTag(getServoInstanceTag()));
}

@Override
public K getValue(int n) {
return getValue();
}

@Override
public abstract K getValue();
}

protected abstract class CounterMetric extends AbstractMonitor<Long> implements Counter {
protected abstract class CounterMetric extends AbstractMonitor<Number> implements Counter {
public CounterMetric(MonitorConfig config) {
super(config.withAdditionalTag(DataSourceType.COUNTER).withAdditionalTag(getServoTypeTag()).withAdditionalTag(getServoInstanceTag()));
}

@Override
public Number getValue(int n) {
return getValue();
}

@Override
public abstract Number getValue();

@Override
public void increment() {
throw new IllegalStateException("We are wrapping a value instead.");
Expand All @@ -61,6 +77,14 @@ protected abstract class GaugeMetric extends AbstractMonitor<Number> implements
public GaugeMetric(MonitorConfig config) {
super(config.withAdditionalTag(DataSourceType.GAUGE).withAdditionalTag(getServoTypeTag()).withAdditionalTag(getServoInstanceTag()));
}

@Override
public Number getValue(int n) {
return getValue();
}

@Override
public abstract Number getValue();
}

protected Monitor<?> getCumulativeCountForEvent(String name, final HystrixCommandMetrics metrics, final HystrixRollingNumberEvent event) {
Expand Down

0 comments on commit a9b432d

Please sign in to comment.