]> git.proxmox.com Git - ceph.git/blob - ceph/src/rocksdb/java/rocksjni/snapshot.cc
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / rocksdb / java / rocksjni / snapshot.cc
1 // Copyright (c) 2011-present, Facebook, Inc. All rights reserved.
2 // This source code is licensed under the BSD-style license found in the
3 // LICENSE file in the root directory of this source tree. An additional grant
4 // of patent rights can be found in the PATENTS file in the same directory.
5 //
6 // This file implements the "bridge" between Java and C++.
7
8 #include <jni.h>
9 #include <stdio.h>
10 #include <stdlib.h>
11
12 #include "include/org_rocksdb_Snapshot.h"
13 #include "rocksdb/db.h"
14 #include "rocksjni/portal.h"
15
16 /*
17 * Class: org_rocksdb_Snapshot
18 * Method: getSequenceNumber
19 * Signature: (J)J
20 */
21 jlong Java_org_rocksdb_Snapshot_getSequenceNumber(JNIEnv* env,
22 jobject jobj, jlong jsnapshot_handle) {
23 auto* snapshot = reinterpret_cast<rocksdb::Snapshot*>(
24 jsnapshot_handle);
25 return snapshot->GetSequenceNumber();
26 }