コード例 #1
0
    def __init__(self, session_id, tx_type, transaction_endpoint):
        self.session_id = session_id
        self.tx_type = tx_type.value

        self._communicator = Communicator(transaction_endpoint)

        # open the transaction with an 'open' message
        open_req = RequestBuilder.open_tx(session_id, tx_type)
        self._communicator.single_request(open_req)
コード例 #2
0
    def __init__(self, keyspace, tx_type: enums.TxType, credentials, transaction_endpoint):
        self.keyspace = keyspace
        self.tx_type = tx_type.value
        self.credentials = credentials

        self._communicator = Communicator(transaction_endpoint)

        # open the transaction with an 'open' message
        open_req = RequestBuilder.open_tx(keyspace, tx_type, credentials)
        self._communicator.send(open_req)