Adding NoopScope, TestScope and Sanitizer
This pull request contains the following commits to bring uber-java/tally on par with uber-go/tally:
- Upgrade to Java 8 (previous attempt #39)
- enable the use of static interface methods to hide implementation classes.
- remove
synchronizedstatements and enable the use ofConcurrentMap.putIfAbsent.
- Only exposing public interfaces, implementations are package-private:
- Moving
BucketPairImpl.bucketPairs()toBucketPairs.create().
- Moving
- Adding NoopScope (previous attempt #40), NullStatsReporter
- Adding TestScope interface and factory methods
- Adding Sanitizer interface and implementation
Repeats the features from
https://github.com/uber-java/tally/pull/39 https://github.com/uber-java/tally/pull/40
Only exposing public interfaces, implementations are package-private.
This is unfortunately probably backwards incompatible, and I'm not sure worth a new version. Should we back that out? cc @prateek
Only exposing public interfaces, implementations are package-private.
This is unfortunately probably backwards incompatible, and I'm not sure worth a new version. Should we back that out? cc @prateek
The main change here is moving BucketPairImpl. bucketPairs() to BucketPairs.create(), since Java 8 allows you to add static methods to interfaces. Alternatively, we can add BucketPairFactory.createbucketPairs() if we are using Java 7 and hide the *Impl classes.
Repeats the features from #39 Plus other changes to make Travis pass! #40 Different Implementation. This implementation uses
NullStatsReporterjust likeuber-go/tally: https://github.com/uber-go/tally/blob/master/scope.go#L32