Merge pull request #1844 from jrw972/monterey
[ACE_TAO.git] / TAO / tests / Transport_Cache_Manager / mock_transport.h
blob6ad84edf323d8f3717bbaae624b3f0fe821e2fb8
1 class mock_transport
3 public:
4 mock_transport () : id_(0), is_connected_(false), entry_(0), purging_order_ (0), purged_count_ (0) {}
5 size_t id (void) const {return id_;}
6 void id (size_t id) { this->id_ = id;}
7 unsigned long purging_order (void) const {return purging_order_;}
8 void purging_order (unsigned long purging_order) { this->purging_order_ = purging_order;}
9 bool is_connected (void) const {return is_connected_;}
10 void is_connected (bool is_connected) { this->is_connected_ = is_connected;}
11 ACE_Event_Handler::Reference_Count add_reference (void) {return 0;}
12 ACE_Event_Handler::Reference_Count remove_reference (void) {return 0;}
13 void cache_map_entry (TCM::HASH_MAP_ENTRY *entry) {this->entry_ = entry;}
14 TCM::HASH_MAP_ENTRY *cache_map_entry (void) {return this->entry_;}
15 void close_connection (void) { purged_count_ = ++global_purged_count;};
16 int purged_count (void) { return this->purged_count_;}
17 bool can_be_purged (void) { return true;}
18 private:
19 size_t id_;
20 bool is_connected_;
21 TCM::HASH_MAP_ENTRY *entry_;
22 unsigned long purging_order_;
23 /// When did we got purged
24 int purged_count_;