STLdb

PrevUpHomeNext

Class template TransEntry

stldb::TransEntry — Helper class for representing a value of type T in a transactional STL container. TransEntry<T> is a public T. It adds a txn_id, and operation members that represent the transactional state of the data in T. If op_id != No_op, then the row has some pending operation in effect on it.

Synopsis

// In header: </Users/bobw/workspace/stldb_lib/stldb/containers/trans_map_entry.h>

template<typename T> 
class TransEntry {
public:
  // construct/copy/destruct
  TransEntry();
  TransEntry(const TransEntry< T > &);
  TransEntry(const T &);
  TransEntry& operator=(const TransEntry< T > &);
  TransEntry& operator=(const T &);
  ~TransEntry();

  // public member functions
  transaction_id_t lock(Transaction &, TransactionalOperations) ;
  void unlock(transaction_id_t, TransactionalOperations = No_op) ;
  TransactionalOperations getOperation() const;
  transaction_id_t getLockId() const;
  template<typename Archive> void serialize(Archive &, const unsigned int) ;
};

Description

TransEntry public construct/copy/destruct

  1. TransEntry();
  2. TransEntry(const TransEntry< T > & rarg);
  3. TransEntry(const T & rarg);
  4. TransEntry& operator=(const TransEntry< T > & value);
  5. TransEntry& operator=(const T & value);
  6. ~TransEntry();

TransEntry public member functions

  1. transaction_id_t lock(Transaction & t, TransactionalOperations op) ;
  2. void unlock(transaction_id_t txn_id, TransactionalOperations op = No_op) ;
  3. TransactionalOperations getOperation() const;
  4. transaction_id_t getLockId() const;
  5. template<typename Archive> 
      void serialize(Archive & ar, const unsigned int version) ;

PrevUpHomeNext