Lint changes

main
fyrz 11 years ago
parent a5757ff3c2
commit 05204bb119
  1. 4
      java/org/rocksdb/BackupableDB.java
  2. 2
      java/org/rocksdb/CompactionStyle.java
  3. 2
      java/org/rocksdb/CompressionType.java
  4. 4
      java/org/rocksdb/GenericRateLimiterConfig.java
  5. 2
      java/org/rocksdb/MemTableConfig.java
  6. 4
      java/org/rocksdb/Options.java
  7. 8
      java/org/rocksdb/RocksDB.java
  8. 10
      java/org/rocksdb/StatisticsCollector.java
  9. 8
      java/org/rocksdb/StatisticsCollectorCallback.java
  10. 8
      java/org/rocksdb/StatsCollectorInput.java

@ -47,10 +47,10 @@ public class BackupableDB extends RocksDB {
public void createNewBackup(boolean flushBeforeBackup) { public void createNewBackup(boolean flushBeforeBackup) {
createNewBackup(nativeHandle_, flushBeforeBackup); createNewBackup(nativeHandle_, flushBeforeBackup);
} }
/** /**
* Deletes old backups, keeping latest numBackupsToKeep alive. * Deletes old backups, keeping latest numBackupsToKeep alive.
* *
* @param numBackupsToKeep Number of latest backups to keep. * @param numBackupsToKeep Number of latest backups to keep.
*/ */
public void purgeOldBackups(int numBackupsToKeep) { public void purgeOldBackups(int numBackupsToKeep) {

@ -9,7 +9,7 @@ public enum CompactionStyle {
LEVEL((byte) 0), LEVEL((byte) 0),
UNIVERSAL((byte) 1), UNIVERSAL((byte) 1),
FIFO((byte) 2); FIFO((byte) 2);
private final byte value_; private final byte value_;
private CompactionStyle(byte value) { private CompactionStyle(byte value) {

@ -12,7 +12,7 @@ public enum CompressionType {
BZLIB2_COMPRESSION((byte) 3), BZLIB2_COMPRESSION((byte) 3),
LZ4_COMPRESSION((byte) 4), LZ4_COMPRESSION((byte) 4),
LZ4HC_COMPRESSION((byte) 5); LZ4HC_COMPRESSION((byte) 5);
private final byte value_; private final byte value_;
private CompressionType(byte value) { private CompressionType(byte value) {

@ -52,12 +52,12 @@ public class GenericRateLimiterConfig extends RateLimiterConfig {
public GenericRateLimiterConfig(long rateBytesPerSecond) { public GenericRateLimiterConfig(long rateBytesPerSecond) {
this(rateBytesPerSecond, DEFAULT_REFILL_PERIOD_MICROS, DEFAULT_FAIRNESS); this(rateBytesPerSecond, DEFAULT_REFILL_PERIOD_MICROS, DEFAULT_FAIRNESS);
} }
@Override protected long newRateLimiterHandle() { @Override protected long newRateLimiterHandle() {
return newRateLimiterHandle(rateBytesPerSecond_, refillPeriodMicros_, return newRateLimiterHandle(rateBytesPerSecond_, refillPeriodMicros_,
fairness_); fairness_);
} }
private native long newRateLimiterHandle(long rateBytesPerSecond, private native long newRateLimiterHandle(long rateBytesPerSecond,
long refillPeriodMicros, int fairness); long refillPeriodMicros, int fairness);
private final long rateBytesPerSecond_; private final long rateBytesPerSecond_;

@ -21,7 +21,7 @@ public abstract class MemTableConfig {
* which will create a c++ shared-pointer to the c++ MemTableRepFactory * which will create a c++ shared-pointer to the c++ MemTableRepFactory
* that associated with the Java MemTableConfig. * that associated with the Java MemTableConfig.
* *
* @see Options#setMemTableConfig(MemTableConfig) * @see Options#setMemTableConfig(MemTableConfig)
*/ */
abstract protected long newMemTableFactoryHandle(); abstract protected long newMemTableFactoryHandle();
} }

@ -20,7 +20,7 @@ public class Options extends RocksObject {
static final int DEFAULT_NUM_SHARD_BITS = -1; static final int DEFAULT_NUM_SHARD_BITS = -1;
/** /**
* Builtin RocksDB comparators * Builtin RocksDB comparators
*/ */
public enum BuiltinComparator { public enum BuiltinComparator {
BYTEWISE_COMPARATOR, REVERSE_BYTEWISE_COMPARATOR; BYTEWISE_COMPARATOR, REVERSE_BYTEWISE_COMPARATOR;
@ -1115,7 +1115,7 @@ public class Options extends RocksObject {
setMemTableFactory(nativeHandle_, config.newMemTableFactoryHandle()); setMemTableFactory(nativeHandle_, config.newMemTableFactoryHandle());
return this; return this;
} }
/** /**
* Use to control write rate of flush and compaction. Flush has higher * Use to control write rate of flush and compaction. Flush has higher
* priority than compaction. Rate limiting is disabled if nullptr. * priority than compaction. Rate limiting is disabled if nullptr.

@ -323,16 +323,16 @@ public class RocksDB extends RocksObject {
throws RocksDBException { throws RocksDBException {
remove(nativeHandle_, writeOpt.nativeHandle_, key, key.length); remove(nativeHandle_, writeOpt.nativeHandle_, key, key.length);
} }
/** /**
* DB implementations can export properties about their state * DB implementations can export properties about their state
via this method. If "property" is a valid property understood by this via this method. If "property" is a valid property understood by this
DB implementation, fills "*value" with its current value and returns DB implementation, fills "*value" with its current value and returns
true. Otherwise returns false. true. Otherwise returns false.
Valid property names include: Valid property names include:
"rocksdb.num-files-at-level<N>" - return the number of files at level <N>, "rocksdb.num-files-at-level<N>" - return the number of files at level <N>,
where <N> is an ASCII representation of a level number (e.g. "0"). where <N> is an ASCII representation of a level number (e.g. "0").
"rocksdb.stats" - returns a multi-line string that describes statistics "rocksdb.stats" - returns a multi-line string that describes statistics

@ -29,9 +29,9 @@ public class StatisticsCollector {
/** /**
* Constructor for statistics collector. * Constructor for statistics collector.
* *
* @param statsCollectorInputList List of statistics collector input. * @param statsCollectorInputList List of statistics collector input.
* @param statsCollectionIntervalInMilliSeconds Statistics collection time * @param statsCollectionIntervalInMilliSeconds Statistics collection time
* period (specified in milliseconds). * period (specified in milliseconds).
*/ */
public StatisticsCollector(List<StatsCollectorInput> statsCollectorInputList, public StatisticsCollector(List<StatsCollectorInput> statsCollectorInputList,
@ -48,7 +48,7 @@ public class StatisticsCollector {
/** /**
* Shuts down statistics collector. * Shuts down statistics collector.
* *
* @param shutdownTimeout Time in milli-seconds to wait for shutdown before * @param shutdownTimeout Time in milli-seconds to wait for shutdown before
* killing the collection process. * killing the collection process.
*/ */
@ -70,13 +70,13 @@ public class StatisticsCollector {
try { try {
if(Thread.currentThread().isInterrupted()) { if(Thread.currentThread().isInterrupted()) {
break; break;
} }
for(StatsCollectorInput statsCollectorInput : for(StatsCollectorInput statsCollectorInput :
_statsCollectorInputList) { _statsCollectorInputList) {
Statistics statistics = statsCollectorInput.getStatistics(); Statistics statistics = statsCollectorInput.getStatistics();
StatisticsCollectorCallback statsCallback = StatisticsCollectorCallback statsCallback =
statsCollectorInput.getCallback(); statsCollectorInput.getCallback();
// Collect ticker data // Collect ticker data
for(TickerType ticker : TickerType.values()) { for(TickerType ticker : TickerType.values()) {
long tickerValue = statistics.getTickerCount(ticker); long tickerValue = statistics.getTickerCount(ticker);

@ -7,13 +7,13 @@ package org.rocksdb;
/** /**
* Callback interface provided to StatisticsCollector. * Callback interface provided to StatisticsCollector.
* *
* Thread safety: * Thread safety:
* StatisticsCollector doesn't make any guarantees about thread safety. * StatisticsCollector doesn't make any guarantees about thread safety.
* If the same reference of StatisticsCollectorCallback is passed to multiple * If the same reference of StatisticsCollectorCallback is passed to multiple
* StatisticsCollector references, then its the responsibility of the * StatisticsCollector references, then its the responsibility of the
* user to make StatisticsCollectorCallback's implementation thread-safe. * user to make StatisticsCollectorCallback's implementation thread-safe.
* *
* @param tickerType * @param tickerType
* @param tickerCount * @param tickerCount
*/ */

@ -12,10 +12,10 @@ package org.rocksdb;
public class StatsCollectorInput { public class StatsCollectorInput {
private final Statistics _statistics; private final Statistics _statistics;
private final StatisticsCollectorCallback _statsCallback; private final StatisticsCollectorCallback _statsCallback;
/** /**
* Constructor for StatsCollectorInput. * Constructor for StatsCollectorInput.
* *
* @param statistics Reference of DB statistics. * @param statistics Reference of DB statistics.
* @param statsCallback Reference of statistics callback interface. * @param statsCallback Reference of statistics callback interface.
*/ */
@ -24,11 +24,11 @@ public class StatsCollectorInput {
_statistics = statistics; _statistics = statistics;
_statsCallback = statsCallback; _statsCallback = statsCallback;
} }
public Statistics getStatistics() { public Statistics getStatistics() {
return _statistics; return _statistics;
} }
public StatisticsCollectorCallback getCallback() { public StatisticsCollectorCallback getCallback() {
return _statsCallback; return _statsCallback;
} }

Loading…
Cancel
Save