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 "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 */ Java_org_rocksdb_Snapshot_getSequenceNumber(JNIEnv *,jobject,jlong jsnapshot_handle)21jlong Java_org_rocksdb_Snapshot_getSequenceNumber(JNIEnv* /*env*/, 22 jobject /*jobj*/, 23 jlong jsnapshot_handle) { 24 auto* snapshot = 25 reinterpret_cast<ROCKSDB_NAMESPACE::Snapshot*>(jsnapshot_handle); 26 return snapshot->GetSequenceNumber(); 27 } 28