public class SandboxEnvironmentShell extends MetadataEnvironmentShell
execute
methods in this class ensure that
SandboxEnvironment.getCurrent()
returns an object for the
sandbox specified by the constructor during the execution of the
Callable
. Typically an instance of this class is used to
perform a sandbox operation when the current thread is not associated
with a sandbox but the operation expects
SandboxEnvironment.getCurrent()
to return an instance
associated with the sandbox.MetadataEnvironmentShell.ThreadResources, MetadataEnvironmentShell.Variable<T>, MetadataEnvironmentShell.Variables
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
_sandboxId
The ID of the sandbox this environment shell is for.
|
static MetadataEnvironmentShell.Variable<java.lang.Boolean> |
IS_REQUEST_FOR_REFRESH
The variable that provides the returned value of
SandboxEnvironment.isRequestForRefresh() in a
SandboxEnvironmentThread . |
CONTEXT_PARAMETER_MAP, ISOLATED, metadataRevisionId
Constructor and Description |
---|
SandboxEnvironmentShell(java.lang.String sandboxId)
Constructs a shell for a sandbox.
|
SandboxEnvironmentShell(java.lang.String sandboxId,
MdsRepository mdsRepos)
Constructs a shell for an MDS repository in a sandbox.
|
SandboxEnvironmentShell(java.lang.String sandboxId,
MdsRepository mdsRepos,
MetadataEnvironmentShell.Variables globalVariables)
Constructs a shell for an MDS repository in a sandbox.
|
Modifier and Type | Method and Description |
---|---|
protected java.lang.String |
getMdsRepositoryId()
Returns the ID of the MDS repository if this shell is for an MDS
repository.
|
protected oracle.mds.naming.Namespace |
getMdsStoreLocator()
Returns the namespace to identify the store used by the MDS repository
if this shell is for an MDS repository.
|
java.lang.String |
getSandboxId()
Returns the ID of the sandbox this shell is for.
|
protected SandboxEnvironmentThread |
newSandboxEnvironmentThread(MetadataEnvironmentShell.Variables variables,
java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name,
long stackSize)
Creates a thread for task execution.
|
protected MetadataEnvironmentThread |
newThread(MetadataEnvironmentShell.Variables variables,
java.lang.ThreadGroup group,
java.lang.Runnable target,
java.lang.String name,
long stackSize)
Creates a thread for task execution.
|
protected MetadataEnvironmentThread.Resources |
newThreadResources()
Returns resources acquired from the current thread.
|
call, call, current, execute, execute, execute, execute, getGlobalVariable, getMetadataRevisionId, getVariable, isGlobalVariableSet, isVariableSet
public static final MetadataEnvironmentShell.Variable<java.lang.Boolean> IS_REQUEST_FOR_REFRESH
SandboxEnvironment.isRequestForRefresh()
in a
SandboxEnvironmentThread
.protected final java.lang.String _sandboxId
public SandboxEnvironmentShell(java.lang.String sandboxId)
sandboxId
- the ID of the sandboxjava.lang.IllegalArgumentException
- if the given ID is nullpublic SandboxEnvironmentShell(java.lang.String sandboxId, MdsRepository mdsRepos)
sandboxId
- the ID of the sandboxmdsRepos
- the MDS repositorypublic SandboxEnvironmentShell(java.lang.String sandboxId, MdsRepository mdsRepos, MetadataEnvironmentShell.Variables globalVariables)
sandboxId
- the ID of the sandboxmdsRepos
- the MDS repositoryglobalVariables
- the global variables; null
if nonepublic final java.lang.String getSandboxId()
protected SandboxEnvironmentThread newSandboxEnvironmentThread(MetadataEnvironmentShell.Variables variables, java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize)
variables
- the variables to be set in this thread, or
null
if no variables need to be setgroup
- the thread grouptarget
- the object whose run
is calledname
- the name of the new threadstackSize
- the desired stack size for the new thread, or zero to
indicate that this parameter is to be ignoredprotected MetadataEnvironmentThread.Resources newThreadResources()
MetadataEnvironmentShell
ThreadResources
in order to propagate more information
from the current thread to the new thread.protected final java.lang.String getMdsRepositoryId()
null
otherwiseprotected final oracle.mds.naming.Namespace getMdsStoreLocator()
null
otherwiseprotected final MetadataEnvironmentThread newThread(MetadataEnvironmentShell.Variables variables, java.lang.ThreadGroup group, java.lang.Runnable target, java.lang.String name, long stackSize)
MetadataEnvironmentShell
newThread
in class MetadataEnvironmentShell
variables
- the variables to be set in this thread, or
null
if no variables need to be setgroup
- the thread grouptarget
- the object whose run
is calledname
- the name of the new threadstackSize
- the desired stack size for the new thread, or zero to
indicate that this parameter is to be ignored