Lint changes

main
fyrz 10 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) {
createNewBackup(nativeHandle_, flushBeforeBackup);
}
/**
* Deletes old backups, keeping latest numBackupsToKeep alive.
*
*
* @param numBackupsToKeep Number of latest backups to keep.
*/
public void purgeOldBackups(int numBackupsToKeep) {

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

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

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

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

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

@ -323,16 +323,16 @@ public class RocksDB extends RocksObject {
throws RocksDBException {
remove(nativeHandle_, writeOpt.nativeHandle_, key, key.length);
}
/**
* DB implementations can export properties about their state
via this method. If "property" is a valid property understood by this
DB implementation, fills "*value" with its current value and returns
true. Otherwise returns false.
Valid property names include:
"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").
"rocksdb.stats" - returns a multi-line string that describes statistics

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

@ -7,13 +7,13 @@ package org.rocksdb;
/**
* Callback interface provided to StatisticsCollector.
*
*
* 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
* StatisticsCollector references, then its the responsibility of the
* StatisticsCollector references, then its the responsibility of the
* user to make StatisticsCollectorCallback's implementation thread-safe.
*
*
* @param tickerType
* @param tickerCount
*/

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

Loading…
Cancel
Save