#include <Strategies_T.h>
Inheritance diagram for ACE_Cached_Connect_Strategy< SVC_HANDLER,, MUTEX >:


Public Types | |
| typedef ACE_Creation_Strategy< SVC_HANDLER >  | creation_strategy_type | 
| typedef ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >  | connect_strategy_type | 
| typedef ACE_Concurrency_Strategy< SVC_HANDLER >  | concurrency_strategy_type | 
| typedef ACE_Recycling_Strategy< SVC_HANDLER >  | recycling_strategy_type | 
| typedef ACE_Creation_Strategy< SVC_HANDLER >  | CREATION_STRATEGY | 
| typedef ACE_Concurrency_Strategy< SVC_HANDLER >  | CONCURRENCY_STRATEGY | 
| typedef ACE_Recycling_Strategy< SVC_HANDLER >  | RECYCLING_STRATEGY | 
| typedef ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >  | CONNECT_STRATEGY | 
| typedef ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >  | SELF | 
| typedef ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >  | REFCOUNTED_HASH_RECYCLABLE_ADDRESS | 
| typedef ACE_Hash_Map_Manager_Ex< REFCOUNTED_HASH_RECYCLABLE_ADDRESS, SVC_HANDLER *, ACE_Hash< REFCOUNTED_HASH_RECYCLABLE_ADDRESS >, ACE_Equal_To< REFCOUNTED_HASH_RECYCLABLE_ADDRESS >, ACE_Null_Mutex >  | CONNECTION_MAP | 
| typedef CONNECTION_MAP::ITERATOR | CONNECTION_MAP_ITERATOR | 
| typedef CONNECTION_MAP::ENTRY | CONNECTION_MAP_ENTRY | 
| typedef ACE_Reverse_Lock< MUTEX >  | REVERSE_MUTEX | 
Public Member Functions | |
| ACE_Cached_Connect_Strategy (ACE_Creation_Strategy< SVC_HANDLER > *cre_s=0, ACE_Concurrency_Strategy< SVC_HANDLER > *con_s=0, ACE_Recycling_Strategy< SVC_HANDLER > *rec_s=0, MUTEX *mutex=0, int delete_mutex=0) | |
| Constructor.   | |
| virtual | ~ACE_Cached_Connect_Strategy (void) | 
| Destructor.   | |
| virtual int | open (ACE_Creation_Strategy< SVC_HANDLER > *cre_s, ACE_Concurrency_Strategy< SVC_HANDLER > *con_s, ACE_Recycling_Strategy< SVC_HANDLER > *rec_s) | 
| virtual int | make_svc_handler (SVC_HANDLER *&sh) | 
| Template method for making a new .   | |
| virtual int | activate_svc_handler (SVC_HANDLER *svc_handler) | 
| Template method for activating a new .   | |
| virtual int | assign_recycler (SVC_HANDLER *svc_handler, ACE_Connection_Recycling_Strategy *recycler, const void *recycling_act) | 
| virtual int | prepare_for_recycling (SVC_HANDLER *svc_handler) | 
| Template method for preparing the svc_handler for recycling.   | |
| virtual int | connect_svc_handler (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms) | 
| virtual int | connect_svc_handler (SVC_HANDLER *&sh, SVC_HANDLER *&sh_copy, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms) | 
| virtual int | purge (const void *recycling_act) | 
| Remove from cache.   | |
| virtual int | cache (const void *recycling_act) | 
| Add to cache.   | |
| virtual int | recycle_state (const void *recycling_act, ACE_Recyclable_State new_state) | 
| Get/Set .   | |
| virtual ACE_Recyclable_State | recycle_state (const void *recycling_act) const | 
| Get/Set recycle_state.   | |
| virtual int | mark_as_closed (const void *recycling_act) | 
| Mark as closed.   | |
| virtual int | mark_as_closed_i (const void *recycling_act) | 
| virtual int | cleanup_hint (const void *recycling_act, void **act_holder=0) | 
| Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.   | |
| virtual ACE_Creation_Strategy< SVC_HANDLER > *  | creation_strategy (void) const | 
| virtual ACE_Recycling_Strategy< SVC_HANDLER > *  | recycling_strategy (void) const | 
| virtual ACE_Concurrency_Strategy< SVC_HANDLER > *  | concurrency_strategy (void) const | 
Protected Member Functions | |
| virtual int | new_connection (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms) | 
| Creates a new connection.   | |
| int | find (REFCOUNTED_HASH_RECYCLABLE_ADDRESS &search_addr, CONNECTION_MAP_ENTRY *&entry) | 
| Find an idle handle.   | |
| virtual int | purge_i (const void *recycling_act) | 
| Remove from cache (non-locking version).   | |
| virtual int | cache_i (const void *recycling_act) | 
| Add to cache (non-locking version).   | |
| virtual int | recycle_state_i (const void *recycling_act, ACE_Recyclable_State new_state) | 
| Set  (non-locking version).   | |
| virtual ACE_Recyclable_State | recycle_state_i (const void *recycling_act) const | 
| Get  (non-locking version).   | |
| virtual int | cleanup_hint_i (const void *recycling_act, void **act_holder) | 
| Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>.   | |
| int | check_hint_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms, CONNECTION_MAP_ENTRY *&entry, int &found) | 
| int | find_or_create_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms, CONNECTION_MAP_ENTRY *&entry, int &found) | 
| virtual int | connect_svc_handler_i (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms, int &found) | 
Protected Attributes | |
| CONNECTION_MAP | connection_map_ | 
| Table that maintains the cache of connected s.   | |
| MUTEX * | lock_ | 
| Mutual exclusion for this object.   | |
| int | delete_lock_ | 
| Mutual exclusion for this object.   | |
| REVERSE_MUTEX * | reverse_lock_ | 
| Reverse lock.   | |
| CREATION_STRATEGY * | creation_strategy_ | 
| Creation strategy for an .   | |
| int | delete_creation_strategy_ | 
| CONCURRENCY_STRATEGY * | concurrency_strategy_ | 
| Concurrency strategy for an .   | |
| int | delete_concurrency_strategy_ | 
| RECYCLING_STRATEGY * | recycling_strategy_ | 
| Recycling strategy for an .   | |
| int | delete_recycling_strategy_ | 
is intended to be used as a plug-in connection strategy for ACE_Strategy_Connector. It's added value is re-use of established connections.
Definition at line 829 of file Strategies_T.h.
      
  | 
  |||||
| 
 
 Definition at line 848 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 841 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 854 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 839 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 949 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 952 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 951 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 846 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 837 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 850 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 842 of file Strategies_T.h.  | 
  
      
  | 
  |||||
      
  | 
  |||||
| 
 
 Definition at line 954 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 
 Definition at line 857 of file Strategies_T.h.  | 
  
      
  | 
  ||||||||||||||||||||||||||||
| 
 Constructor. 
  | 
  
      
  | 
  ||||||||||
| 
 Destructor. 
  | 
  
      
  | 
  ||||||||||
| 
 Template method for activating a new . 
  | 
  
      
  | 
  ||||||||||||||||||||
| 
 Template method for setting the recycler information of the svc_handler.  | 
  
      
  | 
  ||||||||||
| 
 Add to cache. 
 Implements ACE_Connection_Recycling_Strategy.  | 
  
      
  | 
  ||||||||||
| 
 Add to cache (non-locking version). 
 Reimplemented in ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER,, CACHING_STRATEGY, ATTRIBUTES, MUTEX >, and ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX >. Referenced by ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >::cache().  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||||||||||
| 
 
  | 
  
      
  | 
  ||||||||||||||||
| 
 Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>. 
 Implements ACE_Connection_Recycling_Strategy.  | 
  
      
  | 
  ||||||||||||||||
| 
 Cleanup hint and reset <*act_holder> to zero if <act_holder != 0>. 
 Reimplemented in ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER,, CACHING_STRATEGY, ATTRIBUTES, MUTEX >, and ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX >. Referenced by ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >::cleanup_hint().  | 
  
      
  | 
  ||||||||||
| 
 
  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||||||
| 
 The default behavior delegates to the method of the <PEER_CONNECTOR::connect>. Please check the documentation in Connector.h for more details. Reimplemented from ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >.  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||
| 
 Checks to see if there is already a in the cache connected to the . If so, we return this pointer. Otherwise we establish the connection, put it into the cache, and return the pointer. <[NOTE]>: the <{reuse_addr}> argument does NOT control re-use of addresses in the cache. Rather, if the underlying protocol requires a "dead time" prior to re-use of its addresses (TCP is a classic example of this), <{and}> the protocol provides a means by which to defeat the dead time, setting this argument to non-zero will defeat the dead-time requirement. <{Dev. Note: We might want to consider enhancing the interface at some point so that this also controls re-use of the cache.}> Reimplemented from ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >.  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||||||
      
  | 
  ||||||||||
| 
 
  | 
  
      
  | 
  ||||||||||||||||
| 
 Find an idle handle. 
  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||||||||||
| 
 
  | 
  
      
  | 
  ||||||||||
| 
 Template method for making a new . 
  | 
  
      
  | 
  ||||||||||
| 
 Mark as closed. 
 Implements ACE_Connection_Recycling_Strategy.  | 
  
      
  | 
  ||||||||||
| 
 Mark as closed (non-locking version). This method needs to be public as it is used in the cleanup of handlers where teh locked version causes a deadlock. Implements ACE_Connection_Recycling_Strategy. Reimplemented in ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER,, CACHING_STRATEGY, ATTRIBUTES, MUTEX >, and ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX >. Referenced by ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >::mark_as_closed().  | 
  
      
  | 
  ||||||||||||||||||||||||||||||||||||
| 
 Creates a new connection. 
  | 
  
      
  | 
  ||||||||||||||||||||
| 
 This methods allow you to change the strategies used by the cached connector.  | 
  
      
  | 
  ||||||||||
| 
 Template method for preparing the svc_handler for recycling. 
  | 
  
      
  | 
  ||||||||||
| 
 Remove from cache. 
 Implements ACE_Connection_Recycling_Strategy.  | 
  
      
  | 
  ||||||||||
      
  | 
  ||||||||||
| 
 Get/Set recycle_state. 
 Implements ACE_Connection_Recycling_Strategy.  | 
  
      
  | 
  ||||||||||||||||
| 
 Get/Set . 
 Implements ACE_Connection_Recycling_Strategy.  | 
  
      
  | 
  ||||||||||
| 
 Get (non-locking version). 
 Reimplemented in ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER,, CACHING_STRATEGY, ATTRIBUTES, MUTEX >, and ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX >.  | 
  
      
  | 
  ||||||||||||||||
      
  | 
  ||||||||||
| 
 
  | 
  
      
  | 
  |||||
| 
 Concurrency strategy for an . 
 Definition at line 1046 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 Table that maintains the cache of connected s. 
 Definition at line 1025 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 Creation strategy for an . 
 Definition at line 1039 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 1 if created the concurrency strategy and thus should delete it, else 0. Definition at line 1050 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 1 if created the creation strategy and thus should delete it, else 0. Definition at line 1043 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 Mutual exclusion for this object. 
 Definition at line 1031 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 1 if created the recycling strategy and thus should delete it, else 0. Definition at line 1057 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 Mutual exclusion for this object. 
 Definition at line 1028 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 Recycling strategy for an . 
 Definition at line 1053 of file Strategies_T.h.  | 
  
      
  | 
  |||||
| 
 Reverse lock. 
 Definition at line 1034 of file Strategies_T.h.  | 
  
 
1.3.6