Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename base classes to abstract class #832

Merged
merged 1 commit into from
Feb 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

import io.opentelemetry.metrics.LabelSet;

class BaseBoundInstrument {
class AbstractBoundInstrument {
private final LabelSet labels;

BaseBoundInstrument(LabelSet labels) {
AbstractBoundInstrument(LabelSet labels) {
this.labels = labels;
// todo: associate with an aggregator/accumulator
}
Expand All @@ -31,11 +31,11 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof BaseBoundInstrument)) {
if (!(o instanceof AbstractBoundInstrument)) {
return false;
}

BaseBoundInstrument that = (BaseBoundInstrument) o;
AbstractBoundInstrument that = (AbstractBoundInstrument) o;

return labels.equals(that.labels);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.List;
import java.util.Map;

abstract class BaseInstrument implements Instrument {
abstract class AbstractInstrument implements Instrument {

private final String name;
private final String description;
Expand All @@ -29,7 +29,7 @@ abstract class BaseInstrument implements Instrument {
private final List<String> labelKeys;

// All arguments cannot be null because they are checked in the abstract builder classes.
BaseInstrument(
AbstractInstrument(
String name,
String description,
String unit,
Expand All @@ -47,11 +47,11 @@ public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof BaseInstrument)) {
if (!(o instanceof AbstractInstrument)) {
return false;
}

BaseInstrument that = (BaseInstrument) o;
AbstractInstrument that = (AbstractInstrument) o;

return name.equals(that.name)
&& description.equals(that.description)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
package io.opentelemetry.sdk.metrics;

import io.opentelemetry.metrics.DoubleCounter;
import io.opentelemetry.metrics.DoubleCounter.BoundDoubleCounter;
import io.opentelemetry.metrics.LabelSet;
import java.util.List;
import java.util.Map;

final class DoubleCounterSdk extends BaseInstrument implements DoubleCounter {
final class DoubleCounterSdk extends AbstractInstrument implements DoubleCounter {

private final boolean monotonic;

Expand Down Expand Up @@ -76,7 +75,7 @@ public int hashCode() {
return result;
}

private static final class Bound extends BaseBoundInstrument implements BoundDoubleCounter {
private static final class Bound extends AbstractBoundInstrument implements BoundDoubleCounter {

private final boolean monotonic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
package io.opentelemetry.sdk.metrics;

import io.opentelemetry.metrics.DoubleMeasure;
import io.opentelemetry.metrics.DoubleMeasure.BoundDoubleMeasure;
import io.opentelemetry.metrics.LabelSet;
import java.util.List;
import java.util.Map;

final class DoubleMeasureSdk extends BaseInstrument implements DoubleMeasure {
final class DoubleMeasureSdk extends AbstractInstrument implements DoubleMeasure {

private final boolean absolute;

Expand Down Expand Up @@ -76,7 +75,7 @@ public int hashCode() {
return result;
}

private static final class Bound extends BaseBoundInstrument implements BoundDoubleMeasure {
private static final class Bound extends AbstractBoundInstrument implements BoundDoubleMeasure {

private final boolean absolute;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.List;
import java.util.Map;

final class DoubleObserverSdk extends BaseInstrument implements DoubleObserver {
final class DoubleObserverSdk extends AbstractInstrument implements DoubleObserver {
private final boolean monotonic;

DoubleObserverSdk(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

import io.opentelemetry.metrics.LabelSet;
import io.opentelemetry.metrics.LongCounter;
import io.opentelemetry.metrics.LongCounter.BoundLongCounter;
import java.util.List;
import java.util.Map;

final class LongCounterSdk extends BaseInstrument implements LongCounter {
final class LongCounterSdk extends AbstractInstrument implements LongCounter {

private final boolean monotonic;

Expand Down Expand Up @@ -76,7 +75,7 @@ public int hashCode() {
return result;
}

private static final class Bound extends BaseBoundInstrument implements BoundLongCounter {
private static final class Bound extends AbstractBoundInstrument implements BoundLongCounter {

private final boolean monotonic;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,10 @@

import io.opentelemetry.metrics.LabelSet;
import io.opentelemetry.metrics.LongMeasure;
import io.opentelemetry.metrics.LongMeasure.BoundLongMeasure;
import java.util.List;
import java.util.Map;

final class LongMeasureSdk extends BaseInstrument implements LongMeasure {
final class LongMeasureSdk extends AbstractInstrument implements LongMeasure {

private final boolean absolute;

Expand Down Expand Up @@ -76,7 +75,7 @@ public int hashCode() {
return result;
}

private static final class Bound extends BaseBoundInstrument implements BoundLongMeasure {
private static final class Bound extends AbstractBoundInstrument implements BoundLongMeasure {

private final boolean absolute;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import java.util.List;
import java.util.Map;

final class LongObserverSdk extends BaseInstrument implements LongObserver {
final class LongObserverSdk extends AbstractInstrument implements LongObserver {
private final boolean monotonic;

LongObserverSdk(
Expand Down