|
||||||||||
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.CTMemory
A scoped memory area with an allocator that operates in
constant-bounded time (with respect to the size of the allocation
request). This is done by zeroing the entire memory area when the
CTMemory
is entered (rather than piecemeal, as allocations
are performed).
Field Summary |
Fields inherited from class javax.realtime.ScopedMemory |
joinSynchronizer |
Fields inherited from class javax.realtime.MemoryArea |
logic, parent, sizeInBytes |
Constructor Summary | |
CTMemory(long size)
Creates an CTMemory of the given size. |
|
CTMemory(long initial,
long maximum)
Creates an CTMemory of the given initial and maximal
sizes. |
|
CTMemory(long initial,
long maximum,
Runnable logic)
Creates an CTMemory of the given initial and maximal
sizes, associated with the given Runnable . |
|
CTMemory(long size,
Runnable logic)
Creates an CTMemory of the given size, associated with
the given Runnable . |
|
CTMemory(SizeEstimator size)
Creates an CTMemory of the given size. |
|
CTMemory(SizeEstimator size,
Runnable logic)
Creates an CTMemory of the given size, associated with
the given Runnable . |
|
CTMemory(SizeEstimator initial,
SizeEstimator maximum)
Creates an CTMemory of the given initial and maximal
sizes. |
|
CTMemory(SizeEstimator initial,
SizeEstimator maximum,
Runnable logic)
Creates an CTMemory 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.ScopedMemory |
enter, enter, getMaximumSize, getPortal, getReferenceCount, join, join, joinAndEnter, joinAndEnter, joinAndEnter, joinAndEnter, 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 CTMemory(long size)
CTMemory
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 CTMemory(long initial, long maximum)
CTMemory
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 CTMemory(long initial, long maximum, Runnable logic)
CTMemory
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 CTMemory(long size, Runnable logic)
CTMemory
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 CTMemory(SizeEstimator size)
CTMemory
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 CTMemory(SizeEstimator initial, SizeEstimator maximum)
CTMemory
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 CTMemory(SizeEstimator initial, SizeEstimator maximum, Runnable logic)
CTMemory
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 CTMemory(SizeEstimator size, Runnable logic)
CTMemory
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
"(CTMemory) Scoped memory # N
" where
N
is a unique ID identifying this scoped memory
area.
Please see the implementation
note
in the superclass.
toString
in class ScopedMemory
String
representation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |