org.multiverse.transactional.primitives
Class TransactionalLong
java.lang.Object
org.multiverse.transactional.primitives.TransactionalLong
public final class TransactionalLong
- extends java.lang.Object
A reference for a long.
- Author:
- Peter Veentjer
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
TransactionalLong
public TransactionalLong()
TransactionalLong
public TransactionalLong(long value)
get
public long get()
await
public void await(long desired)
awaitLargerThan
public long awaitLargerThan(long than)
awaitLargerOrEqualThan
public long awaitLargerOrEqualThan(long than)
awaitSmallerThan
public long awaitSmallerThan(long than)
awaitSmallerOrEqualThan
public long awaitSmallerOrEqualThan(long than)
awaitNotEqualThan
public long awaitNotEqualThan(long than)
set
public long set(long newValue)
- Sets the new value and returns the old value.
- Parameters:
newValue - the new value.
- Returns:
- the previous value.
inc
public long inc()
inc
public long inc(long amount)
dec
public long dec()
dec
public long dec(long amount)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode in class java.lang.Object
equals
public boolean equals(java.lang.Object thatObj)
- Overrides:
equals in class java.lang.Object
Copyright © 2008-2010 Multiverse. All Rights Reserved.