sequence number of message.
970108
private void writeFixedFields(long millis, Level level, int threadId, long seq, DataOutput writer)
		throws IOException {
		// Write time first for ease of time filtering.
		writer.writeLong(millis);
		
		// Write our own sequence number for merging purposes.
		long seqNumber;
		synchronized(BinaryLogRecordSerializerImpl.class) {
			seqNumber = counter++;
		}
		writer.writeLong(seqNumber);
		
		// Write data always present in a log record.
		writer.writeShort(level.intValue());
		writer.writeInt(threadId);
		writer.writeLong(seq);
	}
981282
def query_sequence(self):
    
    if not self.entries.seq: return None
    if self.check_flag(0x10): return rc(self.entries.seq)
    return self.entries.seq
646759
def batch_message_from_parts(cls, messages):
        '''
        '''
        # Comma-separate the messages and wrap the lot in square brackets
        middle = b', '.join(messages)
        if not middle:
            raise ProtocolError.empty_batch()
        return b''.join([b'[', middle, b']'])
1020718
def _on_response_message(self, sequence, topic, message):
        

        try:
            conn_key = self._find_connection(topic)
            context = self.conns.get_context(conn_key)
        except ArgumentError:
            self._logger.warn("Dropping message that does not correspond with a known connection, message=%s", message)
            return

        if 'client' in message and message['client'] != self.name:
            self._logger.debug("Dropping message that is for another client %s, we are %s", message['client'], self.name)

        if messages.DisconnectionResponse.matches(message):
            self.conns.finish_disconnection(conn_key, message['success'], message.get('failure_reason', None))
        elif messages.OpenInterfaceResponse.matches(message):
            self.conns.finish_operation(conn_key, message['success'], message.get('failure_reason', None))
        elif messages.RPCResponse.matches(message):
            rpc_message = messages.RPCResponse.verify(message)
            self.conns.finish_operation(conn_key, rpc_message['success'], rpc_message.get('failure_reason', None), rpc_message.get('status', None), rpc_message.get('payload', None))
        elif messages.ProgressNotification.matches(message):
            progress_callback = context.get('progress_callback', None)
            if progress_callback is not None:
                progress_callback(message['done_count'], message['total_count'])
        elif messages.ScriptResponse.matches(message):
            if 'progress_callback' in context:
                del context['progress_callback']

            self.conns.finish_operation(conn_key, message['success'], message.get('failure_reason', None))
        elif messages.DisconnectionNotification.matches(message):
            try:
                conn_key = self._find_connection(topic)
                conn_id = self.conns.get_connection_id(conn_key)
            except ArgumentError:
                self._logger.warn("Dropping disconnect notification that does not correspond with a known connection, topic=%s", topic)
                return

            self.conns.unexpected_disconnect(conn_key)
            self._trigger_callback('on_disconnect', self.id, conn_id)
        else:
            self._logger.warn("Invalid response message received, message=%s", message)
1103294
void logSequences() {

        OrderedHashSet set = sessionData.sequenceUpdateSet;

        if (set == null || set.isEmpty()) {
            return;
        }

        for (int i = 0, size = set.size(); i < size; i++) {
            NumberSequence sequence = (NumberSequence) set.get(i);

            database.logger.writeSequenceStatement(this, sequence);
        }

        sessionData.sequenceUpdateSet.clear();
    }
1170329
def first(sequence, message=None):
    
    try:
        return next(iter(sequence))
    except StopIteration:
        raise ValueError(message or ('Sequence is empty: %s' % sequence))
627495
def _set_seq(self,sequence,start=0):
    """"""
    if start+len(sequence) > self._slen: 
      sys.stderr.write("Error not long enough to add\n")
      sys.exit()
    z = 0
    for i in xrange(start, start+len(sequence)):
      self._set_nt(sequence[z],i)
      z+=1
1175060
def _DecodeUnknownMessages(message, encoded_message, pair_type):
    """"""
    field_type = pair_type.value.type
    new_values = []
    all_field_names = [x.name for x in message.all_fields()]
    for name, value_dict in six.iteritems(encoded_message):
        if name in all_field_names:
            continue
        value = PyValueToMessage(field_type, value_dict)
        if pair_type.value.repeated:
            value = _AsMessageList(value)
        new_pair = pair_type(key=name, value=value)
        new_values.append(new_pair)
    return new_values
1137682
def send_messages(self, sms_messages):
        
        if not sms_messages:
            return
        
        num_sent = 0
        for message in sms_messages:
            if self._send(message):
                num_sent += 1
        return num_sent
843171
private int numberOfMessagesToFetch() {
        int numberOfMessagesNeeded = Math.max(numberOfMessagesToPrefetch, messagesRequested);
        return Math.max(numberOfMessagesNeeded - messagesPrefetched, 0);
    }
658695
def next_message(self):
        
        msg = self._session.next_message()
        if msg:
            return walk(self._from_nvim, msg)
843363
def check_multiline_sequence(node, sequence, index)
      return unless sequence.members.size > 1
      return unless sequence.members[2..-1].any? { |member| member == "\n" }

      add_lint(node.line + index, MESSAGE)
    end
858268
def get_seq_seq(self,obj,default=None):
        """"""
        if is_sequence2(obj):
            return [self.get_seq(o,default) for o in obj]
        else:
            return [self.get_seq(obj,default)]
1133288
def letterSequence(letters, w=40):
  
  sequence = []
  for letter in letters:
    i = ord(letter) - ord('A')
    sequence.append(set(range(i*w,(i+1)*w)))
  return sequence
1227807
protected void incremenetMessageBatchNumber()
   {
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "incremenetMessageBatchNumber");
      checkNotBrowserSession();                                   // F171893
      this.messageBatchNumber++;
      if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) SibTr.debug(this, tc, "Message batch number is now: " + messageBatchNumber);
      if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.exit(this, tc, "incremenetMessageBatchNumber");
   }
904183
def scene_name(sequence_number, scene_id, name):
        """"""
        return MessageWriter().string("scene.name").uint64(sequence_number).uint32(scene_id).string(name).get()
538558
def split_message(message, max_length):
    """"""
    ms = []
    while len(message) > max_length:
        ms.append(message[:max_length])
        message = message[max_length:]
    ms.append(message)
    return ms