示例#1
0
        private static bool PollForResponse(AeronArchive archive, long correlationId)
        {
            ControlResponsePoller poller = archive.ControlResponsePoller();

            if (poller.Poll() > 0 && poller.IsPollComplete())
            {
                if (poller.ControlSessionId() == archive.ControlSessionId() && poller.CorrelationId() == correlationId)
                {
                    if (poller.Code() == ControlResponseCode.ERROR)
                    {
                        throw new ArchiveException("archive response for correlationId=" + correlationId +
                                                   ", error: " + poller.ErrorMessage(), (int)poller.RelevantId());
                    }

                    return(true);
                }
            }

            return(false);
        }
示例#2
0
 private static long PolledRelevantId(AeronArchive archive)
 {
     return(archive.ControlResponsePoller().RelevantId());
 }