AtomicLongExtras

final
class AtomicLongExtras(val value: AtomicLong) extends AnyVal
class AnyVal
trait Matchable
class Any

Value members

Concrete methods

def ++: Long

Increments and returns the new value

Increments and returns the new value

def +=(value: Long): Long

Adds the value and returns the new value

Adds the value and returns the new value

def --: Long

Decrements and returns the new value

Decrements and returns the new value

def -=(value: Long): Long

Subtracts the value and returns the new value

Subtracts the value and returns the new value

def decrementIfGreaterThan(min: Long): Boolean

Decrements the value if the current value is greater than the max value supplied.

Decrements the value if the current value is greater than the max value supplied.

This method is thread-safe without locking.

def incrementIfLessThan(max: Int): Boolean

Increments the value if the current value is less than the max value supplied.

Increments the value if the current value is less than the max value supplied.

This method is thread-safe without locking.

@tailrec
final
def modify(f: Long => Option[Long]): Boolean

Modifies the value atomicly without locking if the resulting value of the function is Some.

Modifies the value atomicly without locking if the resulting value of the function is Some.

def setIfCondition(condition: Long => Boolean, value: Long): Boolean

Concrete fields

val value: AtomicLong