Add doc and end of line

main
Ankit Gupta 11 years ago
parent 143ee5a1c1
commit e0ebea6cc2
  1. 2
      Makefile
  2. 1
      java/Makefile
  3. 5
      java/org/rocksdb/RocksDB.java
  4. 4
      java/org/rocksdb/StatisticsCollector.java
  5. 2
      java/org/rocksdb/StatisticsCollectorCallback.java
  6. 2
      java/org/rocksdb/test/StatisticsCollectorTest.java
  7. 2
      java/org/rocksdb/test/StatsCallbackMock.java

@ -439,7 +439,7 @@ ROCKSDBJNILIB = ./java/librocksdbjni.jnilib
JAVA_INCLUDE = -I/System/Library/Frameworks/JavaVM.framework/Headers/ JAVA_INCLUDE = -I/System/Library/Frameworks/JavaVM.framework/Headers/
endif endif
rocksdbjava: clean rocksdbjava:
OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j32 OPT="-fPIC -DNDEBUG -O2" $(MAKE) $(LIBRARY) -j32
cd java;$(MAKE) java; cd java;$(MAKE) java;
rm -f $(ROCKSDBJNILIB) rm -f $(ROCKSDBJNILIB)

@ -29,6 +29,7 @@ test: java
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.BackupableDBTest java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.BackupableDBTest
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.OptionsTest java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.OptionsTest
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.ReadOptionsTest java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.ReadOptionsTest
java -ea -Djava.library.path=.:../ -cp "$(ROCKSDB_JAR):.:./*" org.rocksdb.test.StatisticsCollectorTest
db_bench: java db_bench: java
javac org/rocksdb/benchmark/*.java javac org/rocksdb/benchmark/*.java

@ -93,10 +93,7 @@ public class RocksDB extends RocksObject {
// This allows to use the rocksjni default Options instead of // This allows to use the rocksjni default Options instead of
// the c++ one. // the c++ one.
Options options = new Options(); Options options = new Options();
db.open(options.nativeHandle_, options.cacheSize_, path); return open(options, path);
db.transferCppRawPointersOwnershipFrom(options);
options.dispose();
return db;
} }
/** /**

@ -57,7 +57,7 @@ public class StatisticsCollector {
public void run() { public void run() {
while (_isRunning) { while (_isRunning) {
try { try {
// 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);
_statsCallback.tickerCallback(ticker, tickerValue); _statsCallback.tickerCallback(ticker, tickerValue);
@ -83,4 +83,4 @@ public class StatisticsCollector {
} }
}; };
} }
} }

@ -24,4 +24,4 @@ public interface StatisticsCollectorCallback {
* @param histData Histogram data. * @param histData Histogram data.
*/ */
void histogramCallback(HistogramType histType, HistogramData histData); void histogramCallback(HistogramType histType, HistogramData histData);
} }

@ -36,4 +36,4 @@ public class StatisticsCollectorTest {
System.out.println("Stats collector test passed.!"); System.out.println("Stats collector test passed.!");
} }
} }

@ -19,4 +19,4 @@ public class StatsCallbackMock implements StatisticsCollectorCallback {
HistogramData histData) { HistogramData histData) {
histCallbackCount++; histCallbackCount++;
} }
} }

Loading…
Cancel
Save