ACE 8.0.5
Loading...
Searching...
No Matches
ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX > Class Template Reference

A connection strategy which caches connections to peers (represented by SVC_HANDLER instances), thereby allowing subsequent re-use of unused, but available, connections. More...

#include <Cached_Connect_Strategy_T.h>

Inheritance diagram for ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >:
Collaboration diagram for ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >:

Public Types

typedef ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDRREFCOUNTED_HASH_RECYCLABLE_ADDRESS
typedef ACE_Hash_Cache_Map_Manager< REFCOUNTED_HASH_RECYCLABLE_ADDRESS, SVC_HANDLER *, ACE_Hash< REFCOUNTED_HASH_RECYCLABLE_ADDRESS >, ACE_Equal_To< REFCOUNTED_HASH_RECYCLABLE_ADDRESS >, CACHING_STRATEGY, ATTRIBUTES > CONNECTION_CACHE
typedef CONNECTION_CACHE::CACHE_ENTRY CONNECTION_CACHE_ENTRY
typedef CONNECTION_CACHE::key_type KEY
typedef CONNECTION_CACHE::mapped_type VALUE
typedef ACE_Recyclable_Handler_Cleanup_Strategy< REFCOUNTED_HASH_RECYCLABLE_ADDRESS, std::pair< SVC_HANDLER *, ATTRIBUTES >, ACE_Hash_Map_Manager_Ex< REFCOUNTED_HASH_RECYCLABLE_ADDRESS, std::pair< SVC_HANDLER *, ATTRIBUTES >, ACE_Hash< REFCOUNTED_HASH_RECYCLABLE_ADDRESS >, ACE_Equal_To< REFCOUNTED_HASH_RECYCLABLE_ADDRESS >, MUTEX > > CLEANUP_STRATEGY
typedef ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX > CCSBASE
Public Types inherited from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >
typedef ACE_Creation_Strategy< SVC_HANDLER > creation_strategy_type
typedef ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2connect_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_2CONNECT_STRATEGY
typedef ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX > SELF
typedef ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDRREFCOUNTED_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_MutexCONNECTION_MAP
typedef CONNECTION_MAP::ITERATOR CONNECTION_MAP_ITERATOR
typedef CONNECTION_MAP::ENTRY CONNECTION_MAP_ENTRY
typedef ACE_Reverse_Lock< MUTEX > REVERSE_MUTEX
Public Types inherited from ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >
typedef ACE_PEER_CONNECTOR_ADDR addr_type
typedef ACE_PEER_CONNECTOR connector_type
typedef SVC_HANDLER handler_type
typedef SVC_HANDLER::stream_type stream_type

Public Member Functions

 ACE_Cached_Connect_Strategy_Ex (CACHING_STRATEGY &caching_s, 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 *lock=0, int delete_lock=0)
 Constructor.
virtual ~ACE_Cached_Connect_Strategy_Ex ()
 Destructor.
virtual int purge_connections ()
 Explicit purging of connection entries from the connection cache.
virtual int mark_as_closed_i (const void *recycling_act)
void cleanup ()
CACHING_STRATEGY & caching_strategy ()
Public Member Functions inherited from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >
 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, bool delete_lock=false)
 Constructor.
virtual ~ACE_Cached_Connect_Strategy ()
 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 <svc_handler>.
virtual int activate_svc_handler (SVC_HANDLER *svc_handler)
 Template method for activating a new svc_handler.
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, bool 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, bool 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 <recycle_state>.
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 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 () const
virtual ACE_Recycling_Strategy< SVC_HANDLER > * recycling_strategy () const
virtual ACE_Concurrency_Strategy< SVC_HANDLER > * concurrency_strategy () const
Public Member Functions inherited from ACE_Connection_Recycling_Strategy
 ACE_Connection_Recycling_Strategy ()
virtual ~ACE_Connection_Recycling_Strategy ()=default
 Virtual Destructor.
Public Member Functions inherited from ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >
 ACE_Connect_Strategy ()
 Default constructor.
virtual ACE_PEER_CONNECTORconnector () const
 Return a reference to the <peer_connector_>.
virtual ~ACE_Connect_Strategy ()
void dump () const
 Dump the state of an object.

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
Public Attributes inherited from ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >
 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.

Protected Member Functions

int find (ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR > &search_addr, ACE_Hash_Map_Entry< ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >, std::pair< SVC_HANDLER *, ATTRIBUTES > > *&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)
 Get/Set recycle_state (non-locking version).
virtual ACE_Recyclable_State recycle_state_i (const void *recycling_act) const
 Get <recycle_state> (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, bool reuse_addr, int flags, int perms, ACE_Hash_Map_Entry< ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >, std::pair< SVC_HANDLER *, ATTRIBUTES > > *&entry, int &found)
virtual 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, bool reuse_addr, int flags, int perms, ACE_Hash_Map_Entry< ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >, std::pair< SVC_HANDLER *, ATTRIBUTES > > *&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, bool reuse_addr, int flags, int perms, int &found)
virtual int cached_connect (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, ACE_Time_Value *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, bool reuse_addr, int flags, int perms)
Protected Member Functions inherited from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >
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, bool 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.
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, bool 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, bool reuse_addr, int flags, int perms, CONNECTION_MAP_ENTRY *&entry, int &found)

Protected Attributes

CONNECTION_CACHE connection_cache_
 Table that maintains the cache of connected SVC_HANDLERs.
Protected Attributes inherited from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >
CONNECTION_MAP connection_map_
 Table that maintains the cache of connected SVC_HANDLERs.
MUTEX * lock_
 Mutual exclusion for this object.
bool delete_lock_
 Mutual exclusion for this object.
REVERSE_MUTEXreverse_lock_
 Reverse lock.
CREATION_STRATEGYcreation_strategy_
 Creation strategy for an <Connector>.
bool delete_creation_strategy_
CONCURRENCY_STRATEGYconcurrency_strategy_
 Concurrency strategy for an <Connector>.
bool delete_concurrency_strategy_
RECYCLING_STRATEGYrecycling_strategy_
 Recycling strategy for an <Connector>.
bool delete_recycling_strategy_
Protected Attributes inherited from ACE_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2 >
ACE_PEER_CONNECTOR connector_
 Factory that establishes connections actively.

Detailed Description

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
class ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >

A connection strategy which caches connections to peers (represented by SVC_HANDLER instances), thereby allowing subsequent re-use of unused, but available, connections.

<Cached_Connect_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 and tweaking the role of the cache as per the caching strategy.

Member Typedef Documentation

◆ CCSBASE

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef ACE_Cached_Connect_Strategy<SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX> ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::CCSBASE

◆ CLEANUP_STRATEGY

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef ACE_Recyclable_Handler_Cleanup_Strategy<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, std::pair<SVC_HANDLER *, ATTRIBUTES>, ACE_Hash_Map_Manager_Ex<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, std::pair<SVC_HANDLER *, ATTRIBUTES>, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>, MUTEX> > ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::CLEANUP_STRATEGY

◆ CONNECTION_CACHE

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef ACE_Hash_Cache_Map_Manager<REFCOUNTED_HASH_RECYCLABLE_ADDRESS, SVC_HANDLER *, ACE_Hash<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>, ACE_Equal_To<REFCOUNTED_HASH_RECYCLABLE_ADDRESS>, CACHING_STRATEGY, ATTRIBUTES> ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::CONNECTION_CACHE

◆ CONNECTION_CACHE_ENTRY

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef CONNECTION_CACHE::CACHE_ENTRY ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::CONNECTION_CACHE_ENTRY

◆ KEY

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef CONNECTION_CACHE::key_type ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::KEY

◆ REFCOUNTED_HASH_RECYCLABLE_ADDRESS

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef ACE_Refcounted_Hash_Recyclable<ACE_PEER_CONNECTOR_ADDR> ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::REFCOUNTED_HASH_RECYCLABLE_ADDRESS

◆ VALUE

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
typedef CONNECTION_CACHE::mapped_type ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::VALUE

Constructor & Destructor Documentation

◆ ACE_Cached_Connect_Strategy_Ex()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
class ATTRIBUTES class MUTEX ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::ACE_Cached_Connect_Strategy_Ex ( CACHING_STRATEGY & caching_s,
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 * lock = 0,
int delete_lock = 0 )

Constructor.

◆ ~ACE_Cached_Connect_Strategy_Ex()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::~ACE_Cached_Connect_Strategy_Ex ( )
virtual

Destructor.

Member Function Documentation

◆ cache_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::cache_i ( const void * recycling_act)
protectedvirtual

Add to cache (non-locking version).

Reimplemented from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >.

◆ cached_connect()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::cached_connect ( SVC_HANDLER *& sh,
const ACE_PEER_CONNECTOR_ADDR & remote_addr,
ACE_Time_Value * timeout,
const ACE_PEER_CONNECTOR_ADDR & local_addr,
bool reuse_addr,
int flags,
int perms )
protectedvirtual

Connection of the svc_handler with the remote host. This method also encapsulates the connection done with auto_purging under the hood. If the connect failed due to the process running out of file descriptors then, auto_purging of some connections are done from the CONNECTION_CACHE. This frees the descriptors which get used in the connect process and hence the connect operation can succeed.

◆ caching_strategy()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
CACHING_STRATEGY & ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::caching_strategy ( )

◆ check_hint_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::check_hint_i ( SVC_HANDLER *& sh,
const ACE_PEER_CONNECTOR_ADDR & remote_addr,
ACE_Time_Value * timeout,
const ACE_PEER_CONNECTOR_ADDR & local_addr,
bool reuse_addr,
int flags,
int perms,
ACE_Hash_Map_Entry< ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >, std::pair< SVC_HANDLER *, ATTRIBUTES > > *& entry,
int & found )
protected

◆ cleanup()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
void ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::cleanup ( )

Since g++ version < 2.8 arent happy with templates, this special method had to be devised to avoid memory leaks and perform cleanup of the <connection_cache_>.

◆ cleanup_hint_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::cleanup_hint_i ( const void * recycling_act,
void ** act_holder )
protectedvirtual

Cleanup hint and reset *act_holder to zero if act_holder != 0.

Reimplemented from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >.

◆ connect_svc_handler_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::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,
bool reuse_addr,
int flags,
int perms,
int & found )
protectedvirtual

◆ find()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::find ( ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR > & search_addr,
ACE_Hash_Map_Entry< ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >, std::pair< SVC_HANDLER *, ATTRIBUTES > > *& entry )
protected

Find an idle handle.

◆ find_or_create_svc_handler_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::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,
bool reuse_addr,
int flags,
int perms,
ACE_Hash_Map_Entry< ACE_Refcounted_Hash_Recyclable< ACE_PEER_CONNECTOR_ADDR >, std::pair< SVC_HANDLER *, ATTRIBUTES > > *& entry,
int & found )
protectedvirtual

◆ mark_as_closed_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::mark_as_closed_i ( const void * recycling_act)
virtual

Mark as closed (non-locking version). This is used during the cleanup of the connections purged.

Reimplemented from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >.

◆ purge_connections()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::purge_connections ( )
virtual

Explicit purging of connection entries from the connection cache.

◆ purge_i()

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::purge_i ( const void * recycling_act)
protectedvirtual

Remove from cache (non-locking version).

Reimplemented from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >.

◆ recycle_state_i() [1/2]

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
ACE_Recyclable_State ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::recycle_state_i ( const void * recycling_act) const
protectedvirtual

Get <recycle_state> (non-locking version).

Reimplemented from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >.

◆ recycle_state_i() [2/2]

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
int ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::recycle_state_i ( const void * recycling_act,
ACE_Recyclable_State new_state )
protectedvirtual

Get/Set recycle_state (non-locking version).

Reimplemented from ACE_Cached_Connect_Strategy< SVC_HANDLER, ACE_PEER_CONNECTOR_2, MUTEX >.

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ connection_cache_

template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>
CONNECTION_CACHE ACE_Cached_Connect_Strategy_Ex< SVC_HANDLER, ACE_PEER_CONNECTOR_1, CACHING_STRATEGY, ATTRIBUTES, MUTEX >::connection_cache_
protected

Table that maintains the cache of connected SVC_HANDLERs.


The documentation for this class was generated from the following files: