#include <LocalMonitor.h>
Public Member Functions | |
LocalMonitor (JNIEnv *env, jobject obj, jfieldID lockField=0) | |
Constructs new LocalMonitor object. | |
virtual | ~LocalMonitor () |
Destructs LocalMonitor object. | |
bool | enter () |
Enters the monitor. | |
bool | exit () |
Exits the monitor. | |
bool | isEntered () const |
Returns true if the monitor is enered. | |
Protected Attributes | |
JNIEnv * | m_env |
jobject | m_obj |
bool | m_entered |
LocalMonitor::LocalMonitor | ( | JNIEnv * | env, | |
jobject | obj, | |||
jfieldID | lockField = 0 | |||
) |
Constructs new LocalMonitor object.
env | the JNIEnv pointer | |
obj | the Java object | |
lockField | the lock field of the object |
bool LocalMonitor::enter | ( | ) |
Enters the monitor.
true
if succeed bool LocalMonitor::exit | ( | ) |
Exits the monitor.
true
if succeed bool LocalMonitor::isEntered | ( | ) | const [inline] |
Returns true
if the monitor is enered.
true
if the monitor is enered