public abstract class UnsafeCloseable extends AbstractCloseable
| Modifier and Type | Field and Description |
|---|---|
protected long |
address |
protected sun.misc.Unsafe |
unsafe |
closedHere, DISABLE_DISCARD_WARNING, DISABLE_THREAD_SAFETY, STRICT_DISCARD_WARNING, WARN_NSINIT, TMP| Modifier | Constructor and Description |
|---|---|
protected |
UnsafeCloseable() |
| Modifier and Type | Method and Description |
|---|---|
long |
addAtomicLong(long delta) |
long |
addLong(long delta) |
protected void |
address(long address) |
boolean |
compareAndSwapLong(long expected,
long value) |
long |
getLong() |
long |
getVolatileLong() |
long |
getVolatileLong(long closedLong) |
protected void |
performClose()
Call close() to ensure this is called exactly once.
|
void |
setLong(long value) |
void |
setOrderedLong(long value) |
void |
setVolatileLong(long value) |
assertCloseable, assertCloseablesClosed, clearUsedByThread, close, createdHere, disableCloseableTracing, disableThreadSafetyCheck, disableThreadSafetyCheck, enableCloseableTracing, gcAndWaitForCloseablesToClose, isClosed, isClosing, isInUserThread, referenceId, resetUsedByThread, shouldPerformCloseInBackground, shouldWaitForClosed, threadSafetyCheck, throwExceptionIfClosed, throwExceptionIfClosedInSetter, toString, unmonitor, waitForCloseablesToClose, waitForClosed, warnAndCloseIfNotClosedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitreferenceName, temporarycloseQuietly, closeQuietlyprotected void address(long address)
protected void performClose()
throws IllegalStateException
AbstractCloseableperformClose in class AbstractCloseableIllegalStateExceptionpublic long getLong()
throws IllegalStateException
IllegalStateExceptionpublic void setLong(long value)
throws IllegalStateException
IllegalStateExceptionpublic long getVolatileLong()
throws IllegalStateException
IllegalStateExceptionpublic void setVolatileLong(long value)
throws IllegalStateException
IllegalStateExceptionpublic long getVolatileLong(long closedLong)
public void setOrderedLong(long value)
throws IllegalStateException
IllegalStateExceptionpublic long addLong(long delta)
throws IllegalStateException
IllegalStateExceptionpublic long addAtomicLong(long delta)
throws IllegalStateException
IllegalStateExceptionpublic boolean compareAndSwapLong(long expected,
long value)
throws IllegalStateException
IllegalStateExceptionCopyright © 2022. All rights reserved.