|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.realtime.MemoryArea
javax.realtime.ScopedMemory
javax.realtime.PrivateScopedMemory
javax.realtime.LTPrivateMemory
The LTPrivateMemory
provides linear time allocation
time. This type of scoped memory allows only one thread at the time
to be within it. Thus it can be considered as a thread
private memory. If more than one thread try to access it at
the same time a run-time exception is thrown.
Field Summary |
Fields inherited from class javax.realtime.PrivateScopedMemory |
owner |
Fields inherited from class javax.realtime.ScopedMemory |
joinSynchronizer |
Fields inherited from class javax.realtime.MemoryArea |
logic, parent, sizeInBytes |
Constructor Summary | |
LTPrivateMemory(long size)
Creates a new LTPrivateMemory instance. |
|
LTPrivateMemory(long minSize,
long maxSize)
Creates a new LTPrivateMemory instance. |
|
LTPrivateMemory(long size,
Runnable logic)
Creates a new LTPrivateMemory instance. |
|
LTPrivateMemory(SizeEstimator size)
Creates a new LTPrivateMemory instance. |
|
LTPrivateMemory(SizeEstimator size,
Runnable logic)
Creates a new LTPrivateMemory instance. |
Method Summary | |
protected void |
fini()
|
protected void |
init()
|
long |
memoryConsumed()
An exact count, in bytes, of the all of the memory currently used by the system for the allocated objects. |
long |
memoryRemaining()
An approximation to the total amount of memory currently available for future allocated objects, measured in bytes. |
Methods inherited from class javax.realtime.PrivateScopedMemory |
enter, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, resetOwner, setOwner, toString |
Methods inherited from class javax.realtime.ScopedMemory |
getMaximumSize, getPortal, getReferenceCount, setPortal |
Methods inherited from class javax.realtime.MemoryArea |
enter, executeInArea, finalize, getMemoryArea, guardedRun, newArray, newInstance, newInstance, size |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LTPrivateMemory(long minSize, long maxSize)
LTPrivateMemory
instance.
minSize
- a long
value representing the
minimum size for this memory.maxSize
- a long
value representing the max
size for this memory area.public LTPrivateMemory(long size)
LTPrivateMemory
instance.
size
- The size of MemoryArea
to allocate, in
bytes. If size is less than or equal to zero an
IllegalArgumentException
is thrown.public LTPrivateMemory(long size, Runnable logic)
LTPrivateMemory
instance.
size
- The size of MemoryArea
to allocate, in
bytes. If size is less than or equal to zero an
IllegalArgumentException
is thrown.logic
- -The java.lang.Runnable
whose run() method is
invoked when any of the variations of enter() which do not take
a java.lang.Runnable
is called.public LTPrivateMemory(SizeEstimator size)
LTPrivateMemory
instance.
size
- A SizeEstimator
object which indicates the
amount of memory required by this MemoryArea
.public LTPrivateMemory(SizeEstimator size, Runnable logic)
LTPrivateMemory
instance.
size
- The size of MemoryArea
to
allocate, in bytes.logic
- The run() method of this object will be called
whenever enter()
called.Method Detail |
public long memoryConsumed()
memoryConsumed
in class MemoryArea
public long memoryRemaining()
memoryRemaining
in class MemoryArea
protected void init()
init
in class MemoryArea
protected void fini()
fini
in class MemoryArea
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |