|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.dautelle.realtime.LocalContext.Variable
This class represents a LocalContext
variable. The number of
instances of this class is voluntarely limited (see JADE's Configuration
for details). Instances of this class should be either
static
or member of persistent objects.
Accessing a local context variable is fast and does not necessitate
internal synchronization or the use of volatile
memory.
Because a local context is visible only to the thread owner or to
concurrent threads
which have been
synchronized, the Java memory model guarantees that local memory
(e.g. cache) has been flushed to main memory and the local context
settings are always inherited by inner contexts
.
Field Summary | |
static int |
MAX
Holds the maximum number of LocalContext.Variable (system
property "jade.variables" , default 1024 ). |
Constructor Summary | |
LocalContext.Variable()
Default constructor (default variable's value is null ). |
|
LocalContext.Variable(java.lang.Object defaultValue)
Creates a context variable having the specified default value. |
Method Summary | |
java.lang.Object |
getValue()
Returns the context-local value of this variable. |
void |
setValue(java.lang.Object value)
Sets the context-local value of this variable. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAX
LocalContext.Variable
(system
property "jade.variables"
, default 1024
).
Constructor Detail |
public LocalContext.Variable()
null
).
public LocalContext.Variable(java.lang.Object defaultValue)
defaultValue
- the default value or root value of this variable.Method Detail |
public java.lang.Object getValue()
LocalContext
is searched first, then
all outer LocalContext
are recursively searched up to the
global root context which contains the default values.
public void setValue(java.lang.Object value)
value
- the new context-local value or null
to inherit the value from outer context (if any).Realtime.toHeap()
|
JADE v6.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |