public class JdkAtomicCounter extends AtomicCounter
AtomicLong| 构造器和说明 |
|---|
JdkAtomicCounter() |
JdkAtomicCounter(long initialValue) |
| 限定符和类型 | 方法和说明 |
|---|---|
long |
get()
Gets the current count value.
|
long |
getAndAdd(long delta)
Gets the current count value and then add specified number of delta.
|
void |
set(long newValue)
Sets a new value to count.
|
getAndIncrementpublic JdkAtomicCounter()
public JdkAtomicCounter(long initialValue)
public long get()
AtomicCounterget 在类中 AtomicCounterpublic void set(long newValue)
AtomicCounterset 在类中 AtomicCounternewValue - the new valuepublic long getAndAdd(long delta)
AtomicCountergetAndAdd 在类中 AtomicCounterdelta - the number of deltaCopyright © 2023. All rights reserved.