-
Notifications
You must be signed in to change notification settings - Fork 907
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Java] Use archiveId
for looking up the RecordingPos counters.
#1571
Conversation
0553a7d
to
3e64940
Compare
* | ||
* @return the id of the Archive. | ||
*/ | ||
public long archiveId() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be cached in AeronArchive
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is cached. See below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed that. A style note, I personally like the early return approach for this sort of thing, e.g:
if (Aeron.NULL_VALUE != archiveId)
{
return achiveId;
}
ensureOpen();
ensureNotReentrant();
lastCorrelationId = aeron.nextCorrelationId();
if (!archiveProxy.archiveId(lastCorrelationId, controlSessionId))
{
throw new ArchiveException("failed to send get recorded length request");
}
archiveId = pollForResponse(lastCorrelationId);
return archiveId;
Not required change for merging though.
3e64940
to
9c26002
Compare
Looks good to me. |
archiveId
to the Archive control protocol.AeronArchive.archiveId()
.archiveId
when searching forRecordingPos
byrecordingId
andsessionId
.