Beispiel #1
0
        private static void RoundTripMessages(IMutableDirectBuffer buffer,
            FragmentHandler fragmentHandler, Publication publication, Subscription subscription, int count)
        {
            for (var i = 0; i < count; i++)
            {
                do
                {
                    buffer.PutLong(0, Stopwatch.GetTimestamp());
                } while (publication.Offer(buffer, 0, MessageLength) < 0L);

                PollingIdleStrategy.Reset();
                while (subscription.Poll(fragmentHandler, FragmentCountLimit) <= 0)
                {
                    PollingIdleStrategy.Idle();
                }
            }
        }
        /// <summary>
        /// set client id field
        /// </summary>
        /// <param name="clientId"> field value </param>
        /// <returns> for fluent API </returns>
        public CorrelatedMessageFlyweight ClientId(long clientId)
        {
            buffer.PutLong(offset + CLIENT_ID_FIELD_OFFSET, clientId);

            return(this);
        }
Beispiel #3
0
 public NewLeadershipTermEventEncoder LeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #4
0
        /// <summary>
        /// Set the correlation id field
        /// </summary>
        /// <param name="correlationId"> field value </param>
        /// <returns> flyweight </returns>
        public PublicationBuffersReadyFlyweight CorrelationId(long correlationId)
        {
            _buffer.PutLong(_offset + CORRELATION_ID_OFFSET, correlationId);

            return(this);
        }
Beispiel #5
0
 public SessionKeepAliveEncoder LeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #6
0
 public SnapshotRecordingQueryEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #7
0
 public RecordingDescriptorEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public SessionEventEncoder ClusterSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #9
0
 public ServiceAckEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #10
0
 public VoteEncoder CandidateTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public RemoveClusterMemberEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #12
0
 public ChallengeEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public ElectionStartEventEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #14
0
 public StepsEncoder RecordingStartPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #15
0
 public RecoveryPlanEncoder LastLeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #16
0
 public RecoveryPlanEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public MarkFileHeaderEncoder ActivityTimestamp(long value)
 {
     _buffer.PutLong(_offset + 8, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #18
0
 public TerminationPositionEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
        /// <summary>
        /// set correlation id field
        /// </summary>
        /// <param name="correlationId"> field value </param>
        /// <returns> for fluent API </returns>
        public OperationSucceededFlyweight CorrelationId(long correlationId)
        {
            buffer.PutLong(offset + CORRELATION_ID_FIELD_OFFSET, correlationId);

            return(this);
        }
Beispiel #20
0
 public EntriesEncoder RecordingId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #21
0
 public RequestVoteEncoder LogLeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #22
0
 public DetachSegmentsRequestEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 /// <summary>
 /// Set correlation ID of the offending command.
 /// </summary>
 /// <param name="correlationId"> of the offending command </param>
 /// <returns> flyweight </returns>
 public ErrorResponseFlyweight OffendingCommandCorrelationId(long correlationId)
 {
     _buffer.PutLong(_offset + OFFENDING_COMMAND_CORRELATION_ID_OFFSET, correlationId);
     return(this);
 }
Beispiel #24
0
 public RecordingPositionRequestEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public AuthConnectRequestEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #26
0
        /// <summary>
        /// Set the correlation id field
        /// </summary>
        /// <param name="correlationId"> field value </param>
        /// <returns> flyweight </returns>
        public CounterUpdateFlyweight CorrelationId(long correlationId)
        {
            buffer.PutLong(offset + CORRELATION_ID_OFFSET, correlationId);

            return(this);
        }
        /// <summary>
        /// Set the correlation id field
        /// </summary>
        /// <param name="correlationId"> field value </param>
        /// <returns> flyweight </returns>
        public SubscriptionReadyFlyweight CorrelationId(long correlationId)
        {
            buffer.PutLong(offset + CORRELATION_ID_OFFSET, correlationId);

            return(this);
        }
 public StopAllReplaysRequestEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public ChallengeResponseEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
 public ClusterActionRequestEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Beispiel #31
0
 public AddPassiveMemberEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }