public final class Counter extends AtomicCounter
| Constructor and Description |
|---|
Counter(CountersReader countersReader,
long registrationId,
int counterId)
Construct a read-write view of an existing counter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the counter, releasing the resource managed by the media driver if this was the creator of the Counter.
|
boolean |
isClosed()
Has this object been closed and should no longer be used?
|
long |
registrationId()
Return the registration id used to register this counter with the media driver.
|
appendToLabel, compareAndSet, decrement, decrementOrdered, disconnectCountersManager, get, getAndAdd, getAndAddOrdered, getAndSet, getWeak, id, increment, incrementOrdered, label, proposeMax, proposeMaxOrdered, set, setOrdered, setWeak, toString, updateKey, updateKey, updateLabelpublic Counter(CountersReader countersReader, long registrationId, int counterId)
countersReader - for getting access to the buffers.registrationId - assigned by the driver for the counter or Aeron.NULL_VALUE if not known.counterId - for the counter to be viewed.AeronException - if the id has for the counter has not been allocated.public long registrationId()
public void close()
This method is idempotent and thread safe.
close in interface AutoCloseableclose in class AtomicCounterpublic boolean isClosed()
isClosed in class AtomicCounterCopyright © 2014-2023 Real Logic Limited. All Rights Reserved.