statisticsjni.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
  2. // This source code is licensed under both the GPLv2 (found in the
  3. // COPYING file in the root directory) and Apache 2.0 License
  4. // (found in the LICENSE.Apache file in the root directory).
  5. //
  6. // This file implements the callback "bridge" between Java and C++ for
  7. // ROCKSDB_NAMESPACE::Statistics
  8. #ifndef JAVA_ROCKSJNI_STATISTICSJNI_H_
  9. #define JAVA_ROCKSJNI_STATISTICSJNI_H_
  10. #include <memory>
  11. #include <set>
  12. #include <string>
  13. #include "rocksdb/statistics.h"
  14. #include "monitoring/statistics.h"
  15. namespace ROCKSDB_NAMESPACE {
  16. class StatisticsJni : public StatisticsImpl {
  17. public:
  18. StatisticsJni(std::shared_ptr<Statistics> stats);
  19. StatisticsJni(std::shared_ptr<Statistics> stats,
  20. const std::set<uint32_t> ignore_histograms);
  21. virtual bool HistEnabledForType(uint32_t type) const override;
  22. private:
  23. const std::set<uint32_t> m_ignore_histograms;
  24. };
  25. } // namespace ROCKSDB_NAMESPACE
  26. // @lint-ignore TXT4 T25377293 Grandfathered in
  27. #endif // JAVA_ROCKSJNI_STATISTICSJNI_H_