本文整理汇总了C++中VoltDBEngine::exportAction方法的典型用法代码示例。如果您正苦于以下问题:C++ VoltDBEngine::exportAction方法的具体用法?C++ VoltDBEngine::exportAction怎么用?C++ VoltDBEngine::exportAction使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VoltDBEngine
的用法示例。
在下文中一共展示了VoltDBEngine::exportAction方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: signature
/*
* Class: org_voltdb_jni_ExecutionEngine
* Method: nativeExportAction
*
* @param ackAction true if this call contains an ack
* @param pollAction true if this call requests a poll
* @param syncAction true if the stream offset being set for a table
* @param ackOffset if acking, the universal stream offset being acked/released
* @param tableSignature Signature of the table to which the Export action applies
*
* @return the universal stream offset for the last octet in any
* returned poll results (returned via the query results buffer). On
* any error this will be less than 0. For any call with no
* pollAction, any value >= 0 may be ignored.
*/
SHAREDLIB_JNIEXPORT jlong JNICALL Java_org_voltdb_jni_ExecutionEngine_nativeExportAction
(JNIEnv *env,
jobject obj,
jlong engine_ptr,
jboolean syncAction,
jlong ackOffset,
jlong seqNo,
jbyteArray tableSignature) {
VOLT_DEBUG("nativeExportAction in C++ called");
VoltDBEngine *engine = castToEngine(engine_ptr);
Topend *topend = static_cast<JNITopend*>(engine->getTopend())->updateJNIEnv(env);
jbyte *signatureChars = env->GetByteArrayElements(tableSignature, NULL);
std::string signature(reinterpret_cast<char *>(signatureChars), env->GetArrayLength(tableSignature));
env->ReleaseByteArrayElements(tableSignature, signatureChars, JNI_ABORT);
try {
try {
engine->resetReusedResultOutputBuffer();
return engine->exportAction(syncAction,
static_cast<int64_t>(ackOffset),
static_cast<int64_t>(seqNo),
signature);
} catch (SQLException e) {
throwFatalException("%s", e.message().c_str());
}
} catch (FatalException e) {
topend->crashVoltDB(e);
}
return 0;
}
示例2: castToEngine
/*
* Class: org_voltdb_jni_ExecutionEngine
* Method: nativeExportAction
*
* @param ackAction true if this call contains an ack
* @param pollAction true if this call requests a poll
* @param syncAction true if the stream offset being set for a table
* @param ackOffset if acking, the universal stream offset being acked/released
* @param tableId the table ID to which the Export action applies
*
* @return the universal stream offset for the last octet in any
* returned poll results (returned via the query results buffer). On
* any error this will be less than 0. For any call with no
* pollAction, any value >= 0 may be ignored.
*/
SHAREDLIB_JNIEXPORT jlong JNICALL Java_org_voltdb_jni_ExecutionEngine_nativeExportAction
(JNIEnv *env,
jobject obj,
jlong engine_ptr,
jboolean ackAction,
jboolean pollAction,
jboolean resetAction,
jboolean syncAction,
jlong ackOffset,
jlong seqNo,
jlong tableId) {
VOLT_DEBUG("nativeExportAction in C++ called");
VoltDBEngine *engine = castToEngine(engine_ptr);
Topend *topend = static_cast<JNITopend*>(engine->getTopend())->updateJNIEnv(env);
try {
try {
engine->resetReusedResultOutputBuffer();
return engine->exportAction(ackAction, pollAction, resetAction, syncAction,
static_cast<int64_t>(ackOffset),
static_cast<int64_t>(seqNo),
static_cast<int64_t>(tableId));
} catch (SQLException e) {
throwFatalException("%s", e.message().c_str());
}
} catch (FatalException e) {
topend->crashVoltDB(e);
}
return 0;
}