本文整理汇总了C++中VoltDBEngine::antiCacheReadBlocks方法的典型用法代码示例。如果您正苦于以下问题:C++ VoltDBEngine::antiCacheReadBlocks方法的具体用法?C++ VoltDBEngine::antiCacheReadBlocks怎么用?C++ VoltDBEngine::antiCacheReadBlocks使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VoltDBEngine
的用法示例。
在下文中一共展示了VoltDBEngine::antiCacheReadBlocks方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: castToEngine
SHAREDLIB_JNIEXPORT jint JNICALL Java_org_voltdb_jni_ExecutionEngine_nativeAntiCacheReadBlocks (
JNIEnv *env,
jobject obj,
jlong engine_ptr,
jint tableId,
jshortArray blockIdsArray) {
int retval = org_voltdb_jni_ExecutionEngine_ERRORCODE_ERROR;
VOLT_DEBUG("nativeAntiCacheReadBlocks() start");
VoltDBEngine *engine = castToEngine(engine_ptr);
Topend *topend = static_cast<JNITopend*>(engine->getTopend())->updateJNIEnv(env);
if (engine == NULL) return (retval);
try {
jsize numBlockIds = env->GetArrayLength(blockIdsArray);
jshort *_blockIds = env->GetShortArrayElements(blockIdsArray, NULL);
if (_blockIds == NULL) {
VOLT_ERROR("No evicted blockIds were given to the EE");
return (retval);
}
// XXX: Is this necessary?
uint16_t *blockIds = new uint16_t[numBlockIds];
for (int ii = 0; ii < numBlockIds; ii++) {
blockIds[ii] = _blockIds[ii];
} // FOR
retval = engine->antiCacheReadBlocks(static_cast<int32_t>(tableId), static_cast<int>(numBlockIds), blockIds);
} catch (FatalException e) {
topend->crashVoltDB(e);
}
return (retval);
}