Beispiel #1
0
 def can_send_request(self, request):
     if not Mode.is_done_discovering(self.mode):
         return False
     if self.hasSufficientConnections:
         return True
     if not self.hasAnyConnections:
         return False
     if request.isForced():
         return True
     is_read_only = request.txn_type in self._read_only_requests
     if is_read_only:
         return True
     return False
Beispiel #2
0
 def can_send_read_requests(self):
     if not Mode.is_done_discovering(self.mode):
         return False
     if not self.hasAnyConnections:
         return False
     return True
Beispiel #3
0
 def can_send_write_requests(self):
     if not Mode.is_done_discovering(self.mode):
         return False
     if not self.hasSufficientConnections:
         return False
     return True