|
||||||||||
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 an LTPrivateMemory of the given size. |
|
LTPrivateMemory(long initial,
long maximum)
Creates an LTPrivateMemory of the given initial and maximal
sizes. |
|
LTPrivateMemory(long initial,
long maximum,
Runnable logic)
Creates an LTPrivateMemory of the given initial and maximal
sizes, associated with the given Runnable . |
|
LTPrivateMemory(long size,
Runnable logic)
Creates an LTPrivateMemory of the given size, associated with
the given Runnable . |
|
LTPrivateMemory(SizeEstimator size)
Creates an LTPrivateMemory of the given size. |
|
LTPrivateMemory(SizeEstimator size,
Runnable logic)
Creates an LTPrivateMemory of the given size, associated with
the given Runnable . |
|
LTPrivateMemory(SizeEstimator initial,
SizeEstimator maximum)
Creates an LTPrivateMemory of the given initial and maximal
sizes. |
|
LTPrivateMemory(SizeEstimator initial,
SizeEstimator maximum,
Runnable logic)
Creates an LTPrivateMemory of the given initial and maximal
sizes, associated with the given Runnable . |
Method Summary | |
String |
toString()
Returns a user-friendly representation of this ScopedMemory . |
Methods inherited from class javax.realtime.PrivateScopedMemory |
enter, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, resetOwner, setOwner |
Methods inherited from class javax.realtime.ScopedMemory |
enter, getMaximumSize, getPortal, getReferenceCount, setPortal |
Methods inherited from class javax.realtime.MemoryArea |
executeInArea, finalize, getMemoryArea, guardedRun, memoryConsumed, memoryRemaining, 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 size)
LTPrivateMemory
of the given size.
size
- the size of the memory area to create
IllegalArgumentException
- if size
is less
than zero
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(long initial, long maximum)
LTPrivateMemory
of the given initial and maximal
sizes.
initial
- the initial size for this memory areamaximum
- the maximum size for this memory area
IllegalArgumentException
- if initial
is less
than zero or greater than maximum
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(long initial, long maximum, Runnable logic)
LTPrivateMemory
of the given initial and maximal
sizes, associated with the given Runnable
.
initial
- the initial size for this memory areamaximum
- the maximum size for this memory arealogic
- the Runnable
to associate
IllegalArgumentException
- if initial
is less
than zero or greater than maximum
IllegalAssignmentError
- if storing logic
in
this
violates referencing rules
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(long size, Runnable logic)
LTPrivateMemory
of the given size, associated with
the given Runnable
.
size
- the size of the memory area to createlogic
- the Runnable
to associate
IllegalArgumentException
- if size
is less
than zero
IllegalAssignmentError
- if storing logic
in
this
violates referencing rules
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(SizeEstimator size)
LTPrivateMemory
of the given size.
size
- the size of the memory area to create
IllegalArgumentException
- if size
is
null
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(SizeEstimator initial, SizeEstimator maximum)
LTPrivateMemory
of the given initial and maximal
sizes.
initial
- the initial size for this memory areamaximum
- the maximum size for this memory area
IllegalArgumentException
- if initial
is
greater than maximum
, or if either is null
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(SizeEstimator initial, SizeEstimator maximum, Runnable logic)
LTPrivateMemory
of the given initial and maximal
sizes, associated with the given Runnable
.
initial
- the initial size for this memory areamaximum
- the maximum size for this memory arealogic
- the Runnable
to associate
IllegalArgumentException
- if initial
is
greater than maximum
, or if either is null
IllegalAssignmentError
- if storing logic
in
this
violates referencing rules
OutOfMemoryError
- if there isn't enough storage
available for the backing memorypublic LTPrivateMemory(SizeEstimator size, Runnable logic)
LTPrivateMemory
of the given size, associated with
the given Runnable
.
size
- the size of the memory area to createlogic
- the Runnable
to associate
IllegalArgumentException
- if size
is
null
IllegalAssignmentError
- if storing logic
in
this
violates referencing rules
OutOfMemoryError
- if there isn't enough storage
available for the backing memoryMethod Detail |
public String toString()
ScopedMemory
. This String
is of the form
"(LTPrivateMemory) Scoped memory # N
" where
N
is a unique ID identifying this scoped memory
area.
Please see the implementation
note
.
toString
in class PrivateScopedMemory
String
representation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |