示例#1
0
 def send_body(self, f, protocol_version):
     write_int(f, self.op_type)
     write_int(f, self.op_id)
     if self.op_type == ReviseRequestMessage.RevisionType.PAGING_BACKPRESSURE:
         if self.next_pages <= 0:
             raise UnsupportedOperation(
                 "Continuous paging backpressure requires next_pages > 0")
         elif not ProtocolVersion.has_continuous_paging_next_pages(
                 protocol_version):
             raise UnsupportedOperation(
                 "Continuous paging backpressure may only be used with protocol version "
                 "ProtocolVersion.DSE_V2 or higher. Consider setting Cluster.protocol_version to ProtocolVersion.DSE_V2."
             )
         else:
             write_int(f, self.next_pages)
示例#2
0
 def _write_paging_options(self, f, paging_options, protocol_version):
     write_int(f, paging_options.max_pages)
     write_int(f, paging_options.max_pages_per_second)
     if ProtocolVersion.has_continuous_paging_next_pages(protocol_version):
         write_int(f, paging_options.max_queue_size)