public interface RandomDataUpdate
Modifier and Type | Method and Description |
---|---|
double |
addAtomicDouble(long offset,
double d) |
float |
addAtomicFloat(long offset,
float f) |
int |
addAtomicInt(long offset,
int i) |
long |
addAtomicLong(long offset,
long l) |
byte |
addByte(long offset,
byte b) |
double |
addDouble(long offset,
double d) |
float |
addFloat(long offset,
float f) |
int |
addInt(long offset,
int i) |
long |
addLong(long offset,
long i) |
short |
addShort(long offset,
short s) |
int |
addUnsignedByte(long offset,
int i) |
long |
addUnsignedInt(long offset,
long i) |
int |
addUnsignedShort(long offset,
int i) |
void |
busyLockInt(long offset)
Lock which uses 4 bytes.
|
void |
busyLockLong(long offset)
Lock across processes
|
void |
resetLockInt(long offset)
Lock which uses 4 bytes.
|
void |
resetLockLong(long offset)
Lock which uses 8 bytes.
|
int |
threadIdForLockInt(long offset)
Lock which uses 4 bytes.
|
long |
threadIdForLockLong(long offset)
Lock which uses 8 bytes.
|
boolean |
tryLockInt(long offset)
Lock which uses 4 bytes.
|
boolean |
tryLockLong(long offset)
Lock across processes
|
boolean |
tryLockNanosInt(long offset,
long nanos)
Lock which uses 4 bytes.
|
boolean |
tryLockNanosLong(long offset,
long nanos)
Lock across processes
|
boolean |
tryRWReadLock(long offset,
long timeOutNS)
Uses the 64-bit long at the offset as a non-reentrant read/write lock.
|
boolean |
tryRWWriteLock(long offset,
long timeOutNS)
Uses the 64-bit long at the offset as a non-reentrant read/write lock.
|
void |
unlockInt(long offset)
Lock which uses 4 bytes.
|
void |
unlockLong(long offset)
Lock across processes
|
void |
unlockRWReadLock(long offset)
Uses the 64-bit long at the offset as a non-reentrant read/write lock.
|
void |
unlockRWWriteLock(long offset)
Uses the 64-bit long at the offset as a non-reentrant read/write lock.
|
byte addByte(long offset, byte b)
int addUnsignedByte(long offset, int i)
short addShort(long offset, short s)
int addUnsignedShort(long offset, int i)
int addInt(long offset, int i)
long addUnsignedInt(long offset, long i)
long addLong(long offset, long i)
float addFloat(long offset, float f)
double addDouble(long offset, double d)
int addAtomicInt(long offset, int i)
long addAtomicLong(long offset, long l)
float addAtomicFloat(long offset, float f)
double addAtomicDouble(long offset, double d)
boolean tryLockInt(long offset)
offset
- of the start of the 4-byte lockboolean tryLockNanosInt(long offset, long nanos)
offset
- of the start of the 4-byte locknanos
- to try to lock forvoid busyLockInt(long offset) throws InterruptedException, IllegalStateException
offset
- of the start of the 4-byte lockInterruptedException
- if interruptedIllegalStateException
- if the thread tries to lock it 255 nested time (without an unlock)void unlockInt(long offset) throws IllegalMonitorStateException
offset
- of the start of the 4-byte lockIllegalMonitorStateException
- if this thread doesn't hold the lockvoid resetLockInt(long offset)
offset
- of the start of the 4-byte lockint threadIdForLockInt(long offset)
offset
- of the start of the 4-byte lockboolean tryLockLong(long offset)
Lock which uses 8 bytes. It store the lower 32 bits of the Thread Id, 16 bits are the process id and the re-entrant count as 16 bit. This means if you create more than 16 million threads you can get a collision, and if you try to re-enter 65535 times you will get an ISE
offset
- of the start of the 8-byte lockboolean tryLockNanosLong(long offset, long nanos)
Lock which uses 8 bytes. It store the lower 32 bits of the Thread Id, 16 bits are the process id and the re-entrant count as 16 bit. This means if you create more than 16 million threads you can get a collision, and if you try to re-enter 65535 times you will get an ISE
offset
- of the start of the 8-byte locknanos
- to try to lock forvoid busyLockLong(long offset) throws InterruptedException, IllegalStateException
Lock which uses 8 bytes. It store the lower 32 bits of the Thread Id, 16 bits are the process id and the re-entrant count as 16 bit. This means if you create more than 16 million threads you can get a collision, and if you try to re-enter 65535 times you will get an ISE
offset
- of the start of the 8-byte lockInterruptedException
- if interruptedIllegalStateException
- if the thread tries to lock it 65535 nested time (without an unlock)void unlockLong(long offset) throws IllegalMonitorStateException
Lock which uses 8 bytes. It store the lower 32 bits of the Thread Id, 16 bits are the process id and the re-entrant count as 16 bit. This means if you create more than 16 million threads you can get a collision, and if you try to re-enter 65535 times you will get an ISE
offset
- of the start of the 8-byte lockIllegalMonitorStateException
- if this thread doesn't hold the lockvoid resetLockLong(long offset)
offset
- of the start of the 8-byte locklong threadIdForLockLong(long offset)
offset
- of the start of the 8-byte lockboolean tryRWReadLock(long offset, long timeOutNS) throws IllegalStateException, InterruptedException
offset
- of the long monitortimeOutNS
- length of time to busy wait for the lock.IllegalStateException
- if the monitor is in an illegal stateInterruptedException
boolean tryRWWriteLock(long offset, long timeOutNS) throws IllegalStateException, InterruptedException
offset
- of the long monitortimeOutNS
- length of time to busy wait for the lock.IllegalStateException
- if the monitor is in an illegal stateInterruptedException
void unlockRWReadLock(long offset) throws IllegalStateException
offset
- of the long monitorIllegalStateException
- if the monitor is in an illegal statevoid unlockRWWriteLock(long offset) throws IllegalStateException
offset
- of the long monitorIllegalStateException
- if the monitor is in an illegal stateCopyright © 2019. All rights reserved.