Fennel: /home/pub/open/dev/fennel/farrago/NativeMethods.h File Reference (original) (raw)
Go to the source code of this file.
| Functions |
|
| JNIEXPORT jlong JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_newObjectHandle (JNIEnv *, jclass, jobject) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_deleteObjectHandle (JNIEnv *, jclass, jlong) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_setObjectHandle (JNIEnv *, jclass, jlong, jobject) |
| JNIEXPORT jint JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_getHandleCount (JNIEnv *, jclass) |
| JNIEXPORT jstring JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_getAccessorXmiForTupleDescriptor (JNIEnv *, jclass, jobject) |
| JNIEXPORT jlong JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_executeJavaCmd (JNIEnv *, jclass, jobject, jlong) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_tupleStreamGraphGetInputStreams (JNIEnv *, jclass, jlong, jstring, jobject) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_tupleStreamGraphOpen (JNIEnv *, jclass, jlong, jlong, jobject, jobject) |
| JNIEXPORT jint JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_tupleStreamFetch (JNIEnv *, jclass, jlong, jbyteArray) |
| JNIEXPORT jint JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_tupleStreamTransformFetch (JNIEnv *, jclass, jlong, jint, jbyteArray) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_tupleStreamRestart (JNIEnv *, jclass, jlong) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_tupleStreamGraphClose (JNIEnv *, jclass, jlong, jint) |
| JNIEXPORT jlong JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_newExecutionHandle (JNIEnv *, jclass) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_deleteExecutionHandle (JNIEnv *, jclass, jlong) |
| JNIEXPORT void JNICALL |
Java_net_sf_farrago_fennel_FennelStorage_cancelExecution (JNIEnv *, jclass, jlong) |
Function Documentation
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_cancelExecution |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
|
|
|
| ) |
|
|
|
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_deleteExecutionHandle |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
|
|
|
| ) |
|
|
|
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_deleteObjectHandle |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
|
|
|
| ) |
|
|
|
| JNIEXPORT jlong JNICALL Java_net_sf_farrago_fennel_FennelStorage_executeJavaCmd |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jobject |
, |
|
|
| jlong |
|
|
|
| ) |
|
|
|
| JNIEXPORT jstring JNICALL Java_net_sf_farrago_fennel_FennelStorage_getAccessorXmiForTupleDescriptor |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jobject |
|
|
|
| ) |
|
|
|
Definition at line 320 of file NativeMethods.cpp.
References TupleAccessor::compute(), TupleAccessor::getAttributeAccessor(), TupleAccessor::getBitFieldOffset(), TupleAccessor::getMinByteCount(), JniProxy::init(), AttributeAccessor::iNullBit, isMAXU(), and CmdInterpreter::readTupleDescriptor().
00322 {
00323 JniEnvRef pEnv(pEnvInit);
00324
00325
00326
00327
00328
00329 ProxyTupleDescriptor proxyTupleDesc;
00330 proxyTupleDesc.init(pEnv,jTupleDesc);
00331
00332
00333
00334
00335 StandardTypeDescriptorFactory typeFactory;
00336 TupleDescriptor tupleDescriptor;
00337 CmdInterpreter::readTupleDescriptor(
00338 tupleDescriptor,
00339 proxyTupleDesc,
00340 typeFactory);
00341 TupleAccessor tupleAccessor;
00342 tupleAccessor.compute(tupleDescriptor);
00343 std::ostringstream oss;
00344 oss << "<XMI xmi.version = '1.2' "
00345 << "xmlns:FEMFennel = 'org.omg.xmi.namespace.FEMFennel'>" << std::endl;
00346 oss << "<XMI.content>" << std::endl;
00347 oss << "<FEMFennel:TupleAccessor minByteLength='";
00348 oss << tupleAccessor.getMinByteCount();
00349 oss << "' bitFieldOffset='";
00350 if (
(tupleAccessor.getBitFieldOffset())) {
00351 oss << tupleAccessor.getBitFieldOffset();
00352 } else {
00353 oss << "-1";
00354 }
00355 oss << "'>" << std::endl;
00356 for (uint i = 0; i < tupleDescriptor.size(); ++i) {
00357 AttributeAccessor const &attrAccessor =
00358 tupleAccessor.getAttributeAccessor(i);
00359 oss << "FEMFennel:TupleAccessor.AttrAccessor";
00360 oss << "<FEMFennel:TupleAttrAccessor ";
00361 oss << "nullBitIndex='";
00362 if (
(attrAccessor.iNullBit)) {
00363 oss << attrAccessor.iNullBit;
00364 } else {
00365 oss << "-1";
00366 }
00367 oss << "' ";
00368 oss << "fixedOffset='";
00369 if (
(attrAccessor.iFixedOffset)) {
00370 oss << attrAccessor.iFixedOffset;
00371 } else {
00372 oss << "-1";
00373 }
00374 oss << "' ";
00375 oss << "endIndirectOffset='";
00376 if (
(attrAccessor.iEndIndirectOffset)) {
00377 oss << attrAccessor.iEndIndirectOffset;
00378 } else {
00379 oss << "-1";
00380 }
00381 oss << "' ";
00382 oss << "bitValueIndex='";
00383 if (
(attrAccessor.iValueBit)) {
00384 oss << attrAccessor.iValueBit;
00385 } else {
00386 oss << "-1";
00387 }
00388 oss << "' ";
00389 oss << "/>" << std::endl;
00390 oss << "</FEMFennel:TupleAccessor.AttrAccessor>";
00391 }
00392 oss << "" << std::endl;
00393 oss << "</XMI.content>" << std::endl;
00394 oss << "" << std::endl;
00395 std::string s = oss.str();
00396 return pEnv->NewStringUTF(s.c_str());
00397 }
| JNIEXPORT jint JNICALL Java_net_sf_farrago_fennel_FennelStorage_getHandleCount |
( |
JNIEnv * |
, |
| jclass |
|
|
|
| ) |
|
|
|
| JNIEXPORT jlong JNICALL Java_net_sf_farrago_fennel_FennelStorage_newExecutionHandle |
( |
JNIEnv * |
, |
| jclass |
|
|
|
| ) |
|
|
|
| JNIEXPORT jlong JNICALL Java_net_sf_farrago_fennel_FennelStorage_newObjectHandle |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jobject |
|
|
|
| ) |
|
|
|
Definition at line 400 of file NativeMethods.cpp.
References JniUtil::incrementHandleCount().
00402 {
00403
00404
00405 JniEnvRef pEnv(pEnvInit);
00406 jobject jGlobalRef;
00407 if (obj) {
00408 jGlobalRef = pEnv->NewGlobalRef(obj);
00409
00410 assert(jGlobalRef);
00411 } else {
00412 jGlobalRef = NULL;
00413 }
00414 jobject *pGlobalRef = new jobject;
00415 JniUtil::incrementHandleCount(JAVAOBJECTHANDLE_TYPE_STR, pGlobalRef);
00416 *pGlobalRef = jGlobalRef;
00417 return reinterpret_cast(pGlobalRef);
00418 }
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_setObjectHandle |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
, |
|
|
| jobject |
|
|
|
| ) |
|
|
|
Definition at line 439 of file NativeMethods.cpp.
00441 {
00442
00443
00444 JniEnvRef pEnv(pEnvInit);
00445 jobject *pGlobalRef = reinterpret_cast<jobject *>(handle);
00446 jobject jGlobalRef = *pGlobalRef;
00447 if (jGlobalRef) {
00448 pEnv->DeleteGlobalRef(jGlobalRef);
00449 }
00450 if (obj) {
00451 jGlobalRef = pEnv->NewGlobalRef(obj);
00452
00453 assert(jGlobalRef);
00454 } else {
00455 jGlobalRef = NULL;
00456 }
00457 *pGlobalRef = jGlobalRef;
00458 }
| JNIEXPORT jint JNICALL Java_net_sf_farrago_fennel_FennelStorage_tupleStreamFetch |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
, |
|
|
| jbyteArray |
|
|
|
| ) |
|
|
|
Definition at line 117 of file NativeMethods.cpp.
References ExecStreamBufAccessor::consumeData(), EXECBUF_EOS, ExecStreamBufAccessor::getConsumptionAvailableBounded(), ExecStreamBufAccessor::getConsumptionStart(), CmdInterpreter::getExecStreamFromLong(), ExecStream::getGraph(), ExecStreamGraph::getScheduler(), ExecStreamBufAccessor::getState(), JniEnvRef::handleExcn(), ExecStreamBufAccessor::isConsumptionPossible(), and ExecStreamScheduler::readStream().
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_tupleStreamGraphClose |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
, |
|
|
| jint |
|
|
|
| ) |
|
|
|
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_tupleStreamGraphGetInputStreams |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
, |
|
|
| jstring |
, |
|
|
| jobject |
|
|
|
| ) |
|
|
|
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_tupleStreamGraphOpen |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
, |
|
|
| jlong |
, |
|
|
| jobject |
, |
|
|
| jobject |
|
|
|
| ) |
|
|
|
Definition at line 231 of file NativeMethods.cpp.
References CmdInterpreter::getStreamGraphHandleFromLong(), CmdInterpreter::getTxnHandleFromLong(), JniEnvRef::handleExcn(), CmdInterpreter::StreamGraphHandle::javaRuntimeContext, CmdInterpreter::newErrorTarget(), CmdInterpreter::TxnHandle::pDb, CmdInterpreter::StreamGraphHandle::pExecStreamGraph, CmdInterpreter::StreamGraphHandle::pReadCommittedSegment, CmdInterpreter::TxnHandle::pReadCommittedSnapshotSegment, CmdInterpreter::TxnHandle::pResourceGovernor, CmdInterpreter::StreamGraphHandle::pScheduler, CmdInterpreter::StreamGraphHandle::pSegment, CmdInterpreter::TxnHandle::pSnapshotSegment, and CmdInterpreter::TxnHandle::pTxn.
| JNIEXPORT void JNICALL Java_net_sf_farrago_fennel_FennelStorage_tupleStreamRestart |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
|
|
|
| ) |
|
|
|
| JNIEXPORT jint JNICALL Java_net_sf_farrago_fennel_FennelStorage_tupleStreamTransformFetch |
( |
JNIEnv * |
, |
| jclass |
, |
|
|
| jlong |
, |
|
|
| jint |
, |
|
|
| jbyteArray |
|
|
|
| ) |
|
|
|
Generated on Mon Jun 22 04:00:22 2009 for Fennel by
1.5.1