rocksdb/java/rocksjni
Tomasz Posluszny 6528ecc800 Add event listeners to RocksJava (#7425)
Summary:
Allows adding event listeners in RocksJava.

* Adds listeners getter and setter in `Options` and `DBOptions` classes.
* Adds `EventListener` Java interface and base class for implementing custom event listener callbacks - `AbstractEventListener`, which has an underlying native callback class implementing C++ `EventListener` class.
* `AbstractEventListener` class has mechanism for selectively enabling its callback methods in order to prevent invoking Java method if it is not implemented. This decreases performance cost in case only subset of event listener callback methods is needed - the JNI code for remaining "no-op" callbacks is not executed.
* The code is covered by unit tests in `EventListenerTest.java`, there are also tests added for setting/getting listeners field in `OptionsTest.java` and `DBOptionsTest.java`.

Pull Request resolved: https://github.com/facebook/rocksdb/pull/7425

Reviewed By: pdillinger

Differential Revision: D24063390

Pulled By: jay-zhuang

fbshipit-source-id: 508c359538983d6b765e70d9989c351794a944ee
2020-10-14 11:33:52 -07:00
..
backupablejni.cc
backupenginejni.cc
cassandra_compactionfilterjni.cc
cassandra_value_operator.cc
checkpoint.cc
clock_cache.cc
columnfamilyhandle.cc
compact_range_options.cc
compaction_filter.cc
compaction_filter_factory.cc
compaction_filter_factory_jnicallback.cc
compaction_filter_factory_jnicallback.h
compaction_job_info.cc
compaction_job_stats.cc
compaction_options.cc
compaction_options_fifo.cc
compaction_options_universal.cc
comparator.cc
comparatorjnicallback.cc
comparatorjnicallback.h
compression_options.cc
concurrent_task_limiter.cc Implement Java API for ConcurrentTaskLimiter class and compaction_thread_limiter field in ColumnFamilyOptions (#7347) 2020-09-09 12:44:20 -07:00
config_options.cc Add a ConfigOptions for use in comparing objects and converting to/from strings (#6389) 2020-04-21 17:38:17 -07:00
env.cc
env_options.cc
event_listener.cc Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
event_listener_jnicallback.cc Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
event_listener_jnicallback.h Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
filter.cc
ingest_external_file_options.cc
iterator.cc Add RocksIterator::Refresh (#6573) 2020-04-16 15:55:26 -07:00
jnicallback.cc Fix tabs and lint-ignores (#6734) 2020-04-20 11:39:31 -07:00
jnicallback.h Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
loggerjnicallback.cc
loggerjnicallback.h
lru_cache.cc
memory_util.cc
memtablejni.cc
merge_operator.cc
native_comparator_wrapper_test.cc
optimistic_transaction_db.cc
optimistic_transaction_options.cc
options.cc Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
options_util.cc Add a ConfigOptions for use in comparing objects and converting to/from strings (#6389) 2020-04-21 17:38:17 -07:00
persistent_cache.cc
portal.h Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
ratelimiterjni.cc
remove_emptyvalue_compactionfilterjni.cc
restorejni.cc
rocks_callback_object.cc Fix tabs and lint-ignores (#6734) 2020-04-20 11:39:31 -07:00
rocksdb_exception_test.cc
rocksjni.cc RocksJava - Add errorIfLogFileExists parameter to RocksDB.openReadOnly (#7046) 2020-09-17 15:41:25 -07:00
slice.cc
snapshot.cc
sst_file_manager.cc
sst_file_reader_iterator.cc Add RocksIterator::Refresh (#6573) 2020-04-16 15:55:26 -07:00
sst_file_readerjni.cc
sst_file_writerjni.cc
sst_partitioner.cc SST Partitioner interface that allows to split SST files (#6957) 2020-07-24 13:44:49 -07:00
statistics.cc
statisticsjni.cc Fix tabs and lint-ignores (#6734) 2020-04-20 11:39:31 -07:00
statisticsjni.h Fix tabs and lint-ignores (#6734) 2020-04-20 11:39:31 -07:00
table.cc Align RocksJava BlockBasedTableOptions with C++ API (#7088) 2020-07-10 14:32:58 -07:00
table_filter.cc
table_filter_jnicallback.cc
table_filter_jnicallback.h
testable_event_listener.cc Add event listeners to RocksJava (#7425) 2020-10-14 11:33:52 -07:00
thread_status.cc
trace_writer.cc
trace_writer_jnicallback.cc
trace_writer_jnicallback.h
transaction.cc Fix spelling: commited -> committed (#6481) 2020-03-06 12:45:20 -08:00
transaction_db.cc
transaction_db_options.cc
transaction_log.cc
transaction_notifier.cc
transaction_notifier_jnicallback.cc
transaction_notifier_jnicallback.h
transaction_options.cc
ttl.cc
wal_filter.cc
wal_filter_jnicallback.cc
wal_filter_jnicallback.h
write_batch.cc
write_batch_test.cc Change ParseInternalKey() to return Status instead of bool (#7457) 2020-09-30 19:16:47 -07:00
write_batch_with_index.cc Add newer WBWI::NewIteratorWithBase functions to RocksJava (#6872) 2020-05-27 11:59:12 -07:00
write_buffer_manager.cc
writebatchhandlerjnicallback.cc
writebatchhandlerjnicallback.h