parameters: (self, table_id, key, txid, op)
docstring: Apply the operation to its masked object.
  
          @param table_id: The table containing the possibly masked object.
          @type  table_id: C{int}
  
          @param key: The object ID of the possibly masked object.
          @type  key: C{int}
  
          @param op: the operation to apply
          @type  op: L{MTOperation}
docstring_summary: Apply the operation to its masked object.
docstring_tokens: Apply the operation to its masked object .
function: def _apply_op(self, table_id, key, txid, op):
          """Apply the operation to its masked object.
  
          @param table_id: The table containing the possibly masked object.
          @type  table_id: C{int}
  
          @param key: The object ID of the possibly masked object.
          @type  key: C{int}
  
          @param op: the operation to apply
          @type  op: L{MTOperation}
          """
  
          read_rr = ramcloud.RejectRules(object_doesnt_exist=True)
          try:
              blob, version = RAMCloud.read_rr(self, table_id, key, read_rr)
          except ramcloud.NoObjectError:
              # does not exist, so not masked by txid
              return
          otxid, otimeout, odata = unpack(blob)
          if otxid == 0 or otxid != txid:
              # not masked by txid
              return
  
          # So, txid is indeed masking the object we read.
  
          if type(op) == MTOperation:
              # no op
              # remove mask / delete seed
              data = odata
          elif type(op) == MTWrite:
              data = op.data
          elif type(op) == MTDelete:
              data = None
          else:
              raise TxRAMCloud.InconsistencyError("Unknown type in MT: %s" %
                                                  type(op))
  
          # Now, (data is None) determines whether we need to delete or update the
          # object at version.
  
          update_rr = ramcloud.RejectRules.exactly(version)
          if data is None:
              # delete the object at version
              try:
                  RAMCloud.delete_rr(self, table_id, key, update_rr)
              except (ramcloud.NoObjectError, ramcloud.VersionError):
                  # we must be racing another client to clean this up
                  return
          else:
              # update the object at version with data
              blob = pack(0, 0, data)
              try:
                  RAMCloud.write_rr(self, table_id, key, blob, update_rr)
              except (ramcloud.NoObjectError, ramcloud.VersionError):
                  # we must be racing another client to clean this up
                  return
function_tokens: def _apply_op ( self , table_id , key , txid , op ) : read_rr = ramcloud . RejectRules ( object_doesnt_exist = True ) try : blob , version = RAMCloud . read_rr ( self , table_id , key , read_rr ) except ramcloud . NoObjectError : # does not exist, so not masked by txid return otxid , otimeout , odata = unpack ( blob ) if otxid == 0 or otxid != txid : # not masked by txid return # So, txid is indeed masking the object we read. if type ( op ) == MTOperation : # no op # remove mask / delete seed data = odata elif type ( op ) == MTWrite : data = op . data elif type ( op ) == MTDelete : data = None else : raise TxRAMCloud . InconsistencyError ( "Unknown type in MT: %s" % type ( op ) ) # Now, (data is None) determines whether we need to delete or update the # object at version. update_rr = ramcloud . RejectRules . exactly ( version ) if data is None : # delete the object at version try : RAMCloud . delete_rr ( self , table_id , key , update_rr ) except ( ramcloud . NoObjectError , ramcloud . VersionError ) : # we must be racing another client to clean this up return else : # update the object at version with data blob = pack ( 0 , 0 , data ) try : RAMCloud . write_rr ( self , table_id , key , blob , update_rr ) except ( ramcloud . NoObjectError , ramcloud . VersionError ) : # we must be racing another client to clean this up return