public interface CallIdSequence
It is very important that for each next()
and forceNext()
()}
there is a matching complete()
. If they don't match, the number of concurrent
invocations will grow/shrink without bound over time. This can lead to OOME or deadlock.
When backpressure is enabled and there are too many concurrent invocations, calls of next()
will block using a spin-loop with exponential backoff.
Modifier and Type | Method and Description |
---|---|
void |
complete()
Not idempotent: must be called exactly once per invocation.
|
long |
concurrentInvocations()
Returns the number of concurrent invocations.
|
long |
forceNext()
Generates the next unique call ID.
|
long |
getLastCallId()
Returns the last issued call ID.
|
int |
getMaxConcurrentInvocations()
Returns the maximum concurrent invocations supported.
|
long |
next()
Generates the next unique call ID.
|
int getMaxConcurrentInvocations()
long next()
HazelcastOverloadException
- if the outstanding invocation count hasn't dropped below the configured limitlong forceNext()
void complete()
long getLastCallId()
long concurrentInvocations()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.