From d3b44f072ff9526339dd16629e2a7aa3acd10fdf Mon Sep 17 00:00:00 2001 From: Ankit Gupta Date: Wed, 16 Apr 2014 21:55:15 -0700 Subject: [PATCH] Fix white spaces --- java/RocksDBSample.java | 2 +- java/org/rocksdb/HistogramData.java | 16 ++++++++-------- java/org/rocksdb/HistogramType.java | 8 ++++---- java/org/rocksdb/Statistics.java | 12 ++++++------ java/org/rocksdb/TickerType.java | 6 +++--- java/rocksjni/statistics.cc | 6 +++--- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/java/RocksDBSample.java b/java/RocksDBSample.java index dc460443a5..406102426c 100644 --- a/java/RocksDBSample.java +++ b/java/RocksDBSample.java @@ -132,7 +132,7 @@ public class RocksDBSample { System.out.println("Failed in call to getTickerCount()"); assert(false); //Should never reach here. } - + try { for (HistogramType histogramType : HistogramType.values()) { HistogramData data = stats.geHistogramData(histogramType); diff --git a/java/org/rocksdb/HistogramData.java b/java/org/rocksdb/HistogramData.java index c08b3d47b8..3b2e295997 100644 --- a/java/org/rocksdb/HistogramData.java +++ b/java/org/rocksdb/HistogramData.java @@ -11,8 +11,8 @@ public class HistogramData { private final double percentile99_; private final double average_; private final double standardDeviation_; - - public HistogramData(double median, double percentile95, + + public HistogramData(double median, double percentile95, double percentile99, double average, double standardDeviation) { median_ = median; percentile95_ = percentile95; @@ -20,24 +20,24 @@ public class HistogramData { average_ = average; standardDeviation_ = standardDeviation; } - + public double getMedian() { return median_; } - + public double getPercentile95() { return percentile95_; } - + public double getPercentile99() { return percentile99_; } - + public double getAverage() { return average_; } - + public double getStandardDeviation() { return standardDeviation_; } -} \ No newline at end of file +} diff --git a/java/org/rocksdb/HistogramType.java b/java/org/rocksdb/HistogramType.java index 984caa1810..751c03a111 100644 --- a/java/org/rocksdb/HistogramType.java +++ b/java/org/rocksdb/HistogramType.java @@ -26,14 +26,14 @@ public enum HistogramType { HARD_RATE_LIMIT_DELAY_COUNT(15), SOFT_RATE_LIMIT_DELAY_COUNT(16), NUM_FILES_IN_SINGLE_COMPACTION(17); - + private final int value_; - + private HistogramType(int value) { value_ = value; } - + public int getValue() { return value_; - } + } } diff --git a/java/org/rocksdb/Statistics.java b/java/org/rocksdb/Statistics.java index 1f53416506..07c8d8bcbe 100644 --- a/java/org/rocksdb/Statistics.java +++ b/java/org/rocksdb/Statistics.java @@ -10,28 +10,28 @@ package org.rocksdb; * is managed by Options class. */ public class Statistics { - + private final long statsHandle_; - + public Statistics(long statsHandle) { statsHandle_ = statsHandle; } - + public long getTickerCount(TickerType tickerType) { assert(isInitialized()); return getTickerCount0(tickerType.getValue(), statsHandle_); } - + public HistogramData geHistogramData(HistogramType histogramType) { assert(isInitialized()); HistogramData hist = geHistogramData0(histogramType.getValue(), statsHandle_); return hist; } - + private boolean isInitialized() { return (statsHandle_ != 0); } - + private native long getTickerCount0(int tickerType, long handle); private native HistogramData geHistogramData0(int histogramType, long handle); } diff --git a/java/org/rocksdb/TickerType.java b/java/org/rocksdb/TickerType.java index 318406c9a7..5ad714d309 100644 --- a/java/org/rocksdb/TickerType.java +++ b/java/org/rocksdb/TickerType.java @@ -110,13 +110,13 @@ public enum TickerType { NUMBER_SUPERVERSION_ACQUIRES(48), NUMBER_SUPERVERSION_RELEASES(49), NUMBER_SUPERVERSION_CLEANUPS(50); - + private final int value_; - + private TickerType(int value) { value_ = value; } - + public int getValue() { return value_; } diff --git a/java/rocksjni/statistics.cc b/java/rocksjni/statistics.cc index d29dada9e5..7adf3a11c7 100644 --- a/java/rocksjni/statistics.cc +++ b/java/rocksjni/statistics.cc @@ -24,7 +24,7 @@ jlong Java_org_rocksdb_Statistics_getTickerCount0( JNIEnv* env, jobject jobj, int tickerType, jlong handle) { auto st = reinterpret_cast(handle); assert(st != nullptr); - + return st->getTickerCount(static_cast(tickerType)); } @@ -32,11 +32,11 @@ jobject Java_org_rocksdb_Statistics_geHistogramData0( JNIEnv* env, jobject jobj, int histogramType, jlong handle) { auto st = reinterpret_cast(handle); assert(st != nullptr); - + rocksdb::HistogramData data; st->histogramData(static_cast(histogramType), &data); - + // Don't reuse class pointer jclass jclazz = env->FindClass("org/rocksdb/HistogramData"); jmethodID mid = rocksdb::HistogramDataJni::getConstructorMethodId(