public final class Isolates extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Isolates.CreateIsolateParameters
Parameters for the creation of an isolate.
|
static class |
Isolates.IsolateException
An exception thrown in the context of managing isolates.
|
static interface |
Isolates.ProtectionDomain
Identifies a protection domain for an isolate.
|
Modifier and Type | Method and Description |
---|---|
static IsolateThread |
attachCurrentThread(Isolate isolate)
Attaches the current thread to the passed isolate.
|
static IsolateThread |
createIsolate(Isolates.CreateIsolateParameters parameters)
Creates a new isolate with the passed parameters.
|
static void |
detachThread(IsolateThread thread)
Detaches the passed isolate thread from its isolate and discards any state or context that is
associated with it.
|
static IsolateThread |
getCurrentThread(Isolate isolate)
Given an isolate to which the current thread is attached, returns the address of the thread's
associated isolate thread structure.
|
static Isolate |
getIsolate(IsolateThread thread)
Given an isolate thread structure, determines to which isolate it belongs and returns the
address of the isolate structure.
|
static void |
tearDownIsolate(IsolateThread thread)
Tears down an isolate.
|
public static IsolateThread createIsolate(Isolates.CreateIsolateParameters parameters) throws Isolates.IsolateException
IsolateThread
structure is returned.parameters
- Parameters for the creation of the isolate.Isolates.IsolateException
- on error.public static IsolateThread attachCurrentThread(Isolate isolate) throws Isolates.IsolateException
isolate
- The isolate to which to attach the current thread.Isolates.IsolateException
- on error.public static IsolateThread getCurrentThread(Isolate isolate) throws Isolates.IsolateException
null
.isolate
- The isolate for which to retrieve the current thread's corresponding structurenull
if the thread is not attached to that isolate.Isolates.IsolateException
- on error.public static Isolate getIsolate(IsolateThread thread) throws Isolates.IsolateException
null
if the specified isolate thread
structure is no longer valid.thread
- The isolate thread for which to retrieve the isolate.null
.Isolates.IsolateException
- on error.public static void detachThread(IsolateThread thread) throws Isolates.IsolateException
thread
- The isolate thread to detach from its isolate.Isolates.IsolateException
- on error.public static void tearDownIsolate(IsolateThread thread) throws Isolates.IsolateException
IsolateThread
for the current thread which must be
attached to the isolate to be torn down, waits for any other attached threads to detach from
the isolate, then discards the isolate's objects, threads, and any other state or context
that is associated with it. The passed pointer is no longer valid after the method returns.thread
- IsolateThread
of the current thread that is attached to the isolate
which is to be torn down.Isolates.IsolateException
- on error.