| Modifier and Type | Field and Description |
|---|---|
| private static final int | |
| private Arena | |
| private static final ValueLayout. | |
| private final boolean | |
| private static final ValueLayout. | |
| private MemorySegment | |
| pack-priv static final int | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv | OffHeapArray(final Object
the object that will be used to register a cleaner to
free the off-heap array when parent, final long parent becomes phantom reachable;
this is unused if the global arena is specifiedthe number of bytes to allocate len, boolean if global)true use the global arena, otherwise use a
confined arenaCreates an OffHeapArray of the specified length using either the global arena or a confined arena. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| pack-priv void | |
| pack-priv byte | |
| pack-priv int | |
| pack-priv long | |
| pack-priv int | |
| pack-priv void | incrementUsed(int
number of used bytes to increment increment)Increments the number of bytes currently being used. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void |
| ALIGNMENT | back to summary |
|---|---|
| private static final int ALIGNMENT | |
| arena | back to summary |
|---|---|
| private Arena arena | |
| BYTE_LAYOUT | back to summary |
|---|---|
| private static final ValueLayout. | |
| global | back to summary |
|---|---|
| private final boolean global | |
| INT_LAYOUT | back to summary |
|---|---|
| private static final ValueLayout. | |
| segment | back to summary |
|---|---|
| private MemorySegment segment | |
| SIZE_INT | back to summary |
|---|---|
| pack-priv static final int SIZE_INT | |
| used | back to summary |
|---|---|
| private int used | |
| OffHeapArray | back to summary |
|---|---|
| pack-priv OffHeapArray(final Object parent, final long len, boolean global) Creates an OffHeapArray of the specified length using either the global arena or a confined arena. If the global arena is specified, the array may be accessed on any thread, but it must not be resized or freed. If a confined arena is specified, all access to this array must be done on the same thread that constructed it.
| |
| fill | back to summary |
|---|---|
| pack-priv void fill(final byte val) | |
| free | back to summary |
|---|---|
| pack-priv void free() | |
| getByte | back to summary |
|---|---|
| pack-priv byte getByte(long offset) | |
| getInt | back to summary |
|---|---|
| pack-priv int getInt(long offset) | |
| getLength | back to summary |
|---|---|
| pack-priv long getLength() Gets the length of this array.
| |
| getUsed | back to summary |
|---|---|
| pack-priv int getUsed() Gets the number of bytes currently being used. Always <= length
| |
| incrementUsed | back to summary |
|---|---|
| pack-priv void incrementUsed(int increment) Increments the number of bytes currently being used. Current used + increment must be <= length
| |
| putByte | back to summary |
|---|---|
| pack-priv void putByte(long offset, byte val) | |
| putInt | back to summary |
|---|---|
| pack-priv void putInt(long offset, int val) | |
| resize | back to summary |
|---|---|
| pack-priv void resize(final long len) | |
| setUsed | back to summary |
|---|---|
| pack-priv void setUsed(int used) Sets the number of bytes currently being used. Always <= length
| |