Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
 public NewLeadershipTermEventEncoder LeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
 public SessionKeepAliveEncoder LeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 6
0
 public SnapshotRecordingQueryEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 7
0
 public RecordingDescriptorEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 8
0
 public SessionEventEncoder ClusterSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 9
0
 public ServiceAckEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 10
0
 public VoteEncoder CandidateTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 11
0
 public RemoveClusterMemberEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 12
0
 public ChallengeEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 13
0
 public ElectionStartEventEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 14
0
 public StepsEncoder RecordingStartPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 15
0
 public RecoveryPlanEncoder LastLeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 16
0
 public RecoveryPlanEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 17
0
 public MarkFileHeaderEncoder ActivityTimestamp(long value)
 {
     _buffer.PutLong(_offset + 8, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 20
0
 public EntriesEncoder RecordingId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 21
0
 public RequestVoteEncoder LogLeadershipTermId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 22
0
 public DetachSegmentsRequestEncoder ControlSessionId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 23
0
 /// <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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 29
0
 public ChallengeResponseEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 30
0
 public ClusterActionRequestEncoder LogPosition(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }
Ejemplo n.º 31
0
 public AddPassiveMemberEncoder CorrelationId(long value)
 {
     _buffer.PutLong(_offset + 0, value, ByteOrder.LittleEndian);
     return(this);
 }