| 107 | } |
| 108 | |
| 109 | JNIEXPORT jboolean |
| 110 | NativeApplyMutation(JNIEnv* env, jobject jobj, jlong jtable_ptr, jlong jmutation_ptr) { |
| 111 | tera::Table* table = reinterpret_cast<tera::Table*>(jtable_ptr); |
| 112 | tera::RowMutation* mutation = reinterpret_cast<tera::RowMutation*>(jmutation_ptr); |
| 113 | tera::ErrorCode error_code; |
| 114 | |
| 115 | if (table == NULL || mutation == NULL) { |
| 116 | SendErrorJ(env, jobj, "table or mutation not initialized."); |
| 117 | return JNI_FALSE; |
| 118 | } |
| 119 | if (mutation->MutationNum() <= 0) { |
| 120 | return JNI_TRUE; |
| 121 | } |
| 122 | |
| 123 | // mutation->SetCallBack(MutationCallBack); |
| 124 | table->ApplyMutation(mutation); |
| 125 | return JNI_TRUE; |
| 126 | } |
| 127 | |
| 128 | JNIEXPORT void NativeFlushCommits(JNIEnv* env, jobject jobj, jlong jtable_ptr) { |
| 129 | tera::Table* table = reinterpret_cast<tera::Table*>(jtable_ptr); |
nothing calls this directly
no test coverage detected