GraphLab: Distributed Graph-Parallel API
2.1
|
#include <graphlab/jni/org_graphlab_Core.hpp>
Public Member Functions | |
jni_core (JNIEnv *env, jobject &obj) | |
core_type & | operator() () |
~jni_core () | |
jobject & | obj () |
const jobject & | obj () const |
Static Public Member Functions | |
static void | set_jvm (JavaVM *jvm) |
static JavaVM * | get_jvm () |
static void | detach_from_jvm () |
static void | dump_backtrace (int sig) |
static void | throw_exception (JNIEnv *env, const char *exception, const char *message) |
static JNIEnv * | get_jni_env () |
Static Public Attributes | |
static const size_t | ENV_ID = 1 |
Protected Member Functions | |
void | set_obj (jobject obj) |
bool | handle_exception (JNIEnv *env) const |
Wrapper for graphlab::core. Contains the core, a reference to the Java core object (so that it doesn't get garbage collected), and other utility functions for dealing with the JVM.
Definition at line 49 of file org_graphlab_Core.hpp.
|
inline |
Creates a new graphlab core and a new reference to the associated Java org.graphlab.Core object (so that it doesn't get garbage collected.)
[in] | env | JNI environment, which will be used to create the reference to the Java object. |
[in] | obj | associated org.graphlab.Core object. |
Definition at line 75 of file org_graphlab_Core.hpp.
|
inline |
Deallocates the graphlab core. Parent constructor will delete jobject reference.
Definition at line 91 of file org_graphlab_Core.hpp.
|
inlinestatic |
Detaches the current thread from the JVM. If a pointer to the JNI environment cannot be found in the thread-local store, that means that this thread has already been detached, and the function will return immediately. Otherwise, the thread is detached and the pointer to the JNI environment is removed from the thread-local store.
Definition at line 119 of file org_graphlab_Core.hpp.
|
inlinestatic |
Retrieves the JNI environment for the current thread. If a pointer to the JNI environment can be found in the thread-local store, returns immediately; otherwise, that means that the current thread has not been attached to the JVM yet. In that case, this function will attach the current thread to the JVM and save the associated JNI environment to the thread-local storage.
Definition at line 161 of file org_graphlab_Core.hpp.
|
inlinestatic |
Gets a reference to the Java Virtual Machine.
Definition at line 107 of file org_graphlab_Core.hpp.
|
protectedinherited |
Checks for and rethrows Java exceptions.
[in] | env | JNI environment |
Definition at line 117 of file java_any.cpp.
|
inherited |
Retrieves the associated Java object
Definition at line 46 of file java_any.cpp.
|
inline |
Gets the real graphlab core that this method wraps around
Definition at line 83 of file org_graphlab_Core.hpp.
|
inlinestatic |
Saves a reference to the Java Virtual Machine.
[in] | jvm | pointer to the Java Virtual Machine |
Definition at line 99 of file org_graphlab_Core.hpp.
|
protectedinherited |
Deletes the current ref (if any) and creates a new ref if obj
is not null.
[in] | obj | replaces current object ref |
Definition at line 93 of file java_any.cpp.
|
inlinestatic |
Convenience method for throwing Java exceptions
Definition at line 144 of file org_graphlab_Core.hpp.
|
static |
ID of pointer to JNI environment in thread local store
Definition at line 54 of file org_graphlab_Core.hpp.