|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.realtime.MemoryArea javax.realtime.Arena
Arena
is the base class for all those memory areas
whose lifetime depends on reachability. Depending on the type of
Arena
, the objects allocated within it are collected
either based on reachability or all at once.
Field Summary |
Fields inherited from class javax.realtime.MemoryArea |
logic, parent, sizeInBytes |
Constructor Summary | |
protected |
Arena(long size)
Creates a new Arena instance. |
protected |
Arena(long size,
Runnable logic)
Creates a new Arena instance. |
protected |
Arena(SizeEstimator size)
Creates a new Arena instance. |
protected |
Arena(SizeEstimator size,
Runnable logic)
Creates a new RefCountedArena instance. |
Method Summary | |
long |
getMaximumSize()
Get the maximum size this memory area can attain. |
Object |
getPortal()
Returns a reference to the portal object in this instance of ScopedMemory |
void |
setPortal(Object portal)
Set the argument to the portal object in the memory area represented by this instance of ScopedMemory . |
Methods inherited from class javax.realtime.MemoryArea |
enter, enter, executeInArea, finalize, fini, getMemoryArea, guardedRun, init, memoryConsumed, memoryRemaining, newArray, newInstance, newInstance, size |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Arena(long size)
Arena
instance.
size
- a long
value indicating the
Arena
sizeprotected Arena(SizeEstimator size)
Arena
instance.
size
- a long
value indicating the
Arena
sizeprotected Arena(long size, Runnable logic)
Arena
instance.
size
- a long
value indicating the
RefCountedArena
sizelogic
- a Runnable
valueprotected Arena(SizeEstimator size, Runnable logic)
RefCountedArena
instance.
size
- a long
value indicating the
RefCountedArena
sizeMethod Detail |
public long getMaximumSize()
public Object getPortal()
ScopedMemory
public void setPortal(Object portal)
ScopedMemory
.
A portal can serve as a means of interthread communication and
they are used primarily when threads need to share an object
that is allocated in a ScopedMemory
. The portal
object for a ScopedMemory must be allocated in a
ScopedMemory
that is outer then the current.
portal
- The object which will become the portal for this.
If null the previous portal object remains the portal object
for this or if there was no previous portal object then there
is still no portal object for this.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |