public final class NativeIsolate extends Object
NativeObjects have a NativeIsolate
context.| Modifier and Type | Method and Description |
|---|---|
NativeIsolateThread |
enter()
Enters this
NativeIsolate on the current thread. |
static NativeIsolate |
forIsolateId(long isolateId,
JNIConfig config)
|
static NativeIsolate |
get(long isolateId)
Gets the NativeIsolate object for the entered isolate with the specified isolate address.
|
JNIConfig |
getConfig()
Returns the
JNIConfig used by this NativeIsolate. |
long |
getIsolateId()
Returns the isolate address.
|
boolean |
isActive()
Returns true if the current thread is entered to this
NativeIsolate. |
boolean |
isDisposed() |
void |
registerNativeThread(long isolateThreadId)
Binds a native image thread to this isolate.
|
boolean |
shutdown()
Requests an isolate shutdown.
|
String |
toString() |
NativeIsolateThread |
tryEnter()
Tries to enter this
NativeIsolate on the current thread. |
public void registerNativeThread(long isolateThreadId)
NativeIsolate as a
native thread.isolateThreadId - the isolate thread to bind.public NativeIsolateThread enter()
NativeIsolate on the current thread.IllegalStateException - when this NativeObject is already closed or being
closed.public NativeIsolateThread tryEnter()
NativeIsolate on the current thread.NativeIsolateThread on success or null when this
NativeIsolate is closed or being closed.NativeIsolate.enter()public boolean isActive()
NativeIsolate.public boolean shutdown()
NativeIsolate the isolate is closed and the isolate heap is freed. If this
NativeIsolate has active threads the isolate is freed by the last leaving thread.public long getIsolateId()
public JNIConfig getConfig()
JNIConfig used by this NativeIsolate.public static NativeIsolate get(long isolateId)
isolateId - id of an entered isolateIllegalStateException - when NativeIsolate does not exist for the
isolateIdpublic static NativeIsolate forIsolateId(long isolateId, JNIConfig config)
NativeIsolate for the isolateId and JNIConfig. This method
can be called at most once, preferably right after creating the isolate. Use the
NativeIsolate.get(long) method to get an existing NativeIsolate instance.NativeIsolate for the isolateId.IllegalStateException - when NativeIsolate for the isolateId already
exists.public boolean isDisposed()