public abstract class AbstractCallIdSequence extends Object implements CallIdSequence
CallIdSequence that provides backpressure by taking
the number of in-flight operations into account when before creating a new call-id.
It is possible to temporarily create more concurrent invocations than the declared capacity due to:
| Constructor and Description |
|---|
AbstractCallIdSequence(int maxConcurrentInvocations) |
| Modifier and Type | Method and Description |
|---|---|
void |
complete()
Not idempotent: must be called exactly once per invocation.
|
long |
forceNext()
Generates the next unique call ID.
|
long |
getLastCallId()
Returns the last issued call ID.
|
int |
getMaxConcurrentInvocations()
Returns the maximum concurrent invocations supported.
|
protected abstract void |
handleNoSpaceLeft() |
protected boolean |
hasSpace() |
long |
next()
Generates the next unique call ID.
|
public AbstractCallIdSequence(int maxConcurrentInvocations)
public long next()
CallIdSequencenext in interface CallIdSequenceprotected abstract void handleNoSpaceLeft()
public long getLastCallId()
CallIdSequencegetLastCallId in interface CallIdSequencepublic int getMaxConcurrentInvocations()
CallIdSequencegetMaxConcurrentInvocations in interface CallIdSequencepublic void complete()
CallIdSequencecomplete in interface CallIdSequencepublic long forceNext()
CallIdSequenceforceNext in interface CallIdSequenceprotected boolean hasSpace()
Copyright © 2018 Hazelcast, Inc.. All Rights Reserved.