| java.lang.Object org.apache.harmony.misc.accessors.LockedArray
LockedArray | public class LockedArray (Code) | | Wraps the locked primitive type array. Holds a reference to Array object
and its memory location. Objects of this type require a manual disposal
through the
LockedArray.release() method. Please note that the array address
is no longer valid after the
LockedArray.release() call is made.
Locked arrays can only be obtained with help of
ArrayAccessor class.
See Also: ArrayAccessor |
Method Summary | |
public long | getAddress() Returns the memory address for this locked array. | public Object | getArray() Returns the primitive type array object associated with this locked
array. | public boolean | isLocked() Returns true if the array is currently locked, false otherwise. | public boolean | isLongLock() Returns true if the array was locked for a long period of time. | public void | release() Unlocks the array. | public void | releaseNoCopy() Unlocks the array. |
LockedArray | LockedArray(Object array, long addr, boolean isLong)(Code) | | |
getAddress | public long getAddress()(Code) | | Returns the memory address for this locked array.
|
getArray | public Object getArray()(Code) | | Returns the primitive type array object associated with this locked
array.
primitive type array object |
isLocked | public boolean isLocked()(Code) | | Returns true if the array is currently locked, false otherwise.
|
isLongLock | public boolean isLongLock()(Code) | | Returns true if the array was locked for a long period of time.
|
release | public void release()(Code) | | Unlocks the array. This method gives a hint to virtual
machine that this array no longer needs to be locked in memory. The
array address becomes invalid after this call and should no longer be
used. This method does nothing if the array was already released
once.
Default implementation of this method delegates to Release
<>ArrayElements or ReleasePrimitiveArrayCritical JNI calls in case of
long and short locks respectively.
|
releaseNoCopy | public void releaseNoCopy()(Code) | | Unlocks the array. This method gives a hint to virtual
machine that this array no longer needs to be locked in memory and virtual
machine should not copy values back to Java array.
The array address becomes invalid after this call and should no longer be
used. This method does nothing if the array was already released
once.
Default implementation of this method delegates to Release
<>ArrayElements or ReleasePrimitiveArrayCritical JNI calls in case of
long and short locks respectively with JNI_ABORT mode.
|
|
|