File: ACE_Bounded_Cached_Connect_Strategy.3

package info (click to toggle)
ace 5.2.1-1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 26,856 kB
  • ctags: 18,677
  • sloc: cpp: 171,831; makefile: 48,840; sh: 10,192; perl: 8,582; exp: 787; yacc: 387; lex: 140; csh: 20
file content (104 lines) | stat: -rw-r--r-- 6,024 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
.TH ACE_Bounded_Cached_Connect_Strategy 3 "1 Dec 2001" "ACE" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ACE_Bounded_Cached_Connect_Strategy \- A connection strategy which caches connections to peers (represented by <SVC_HANDLER> instances), thereby allowing subsequent re-use of unused, but available, connections. This strategy should be used when the cache is bounded by maximum size. 
.SH SYNOPSIS
.br
.PP
\fC#include <Cached_Connect_Strategy_T.h>\fR
.PP
Inherits \fBACE_Cached_Connect_Strategy_Ex< SVC_HANDLER,ACE_PEER_CONNECTOR_2,CACHING_STRATEGY,ATTRIBUTES,MUTEX >\fR.
.PP
.SS Public Methods

.in +1c
.ti -1c
.RI "\fBACE_Bounded_Cached_Connect_Strategy\fR (size_t max_size, CACHING_STRATEGY &caching_s, \fBACE_Creation_Strategy\fR<SVC_HANDLER> *cre_s = 0, \fBACE_Concurrency_Strategy\fR<SVC_HANDLER> *con_s = 0, \fBACE_Recycling_Strategy\fR<SVC_HANDLER> *rec_s = 0, MUTEX *lock = 0, int delete_lock = 0)"
.br
.RI "\fIConstructor.\fR"
.ti -1c
.RI "virtual \fB~ACE_Bounded_Cached_Connect_Strategy\fR (void)"
.br
.RI "\fIDestructor.\fR"
.in -1c
.SS Public Attributes

.in +1c
.ti -1c
.RI "\fBACE_ALLOC_HOOK_DECLARE\fR"
.br
.RI "\fIDeclare the dynamic allocation hooks.\fR"
.in -1c
.SS Protected Methods

.in +1c
.ti -1c
.RI "virtual int \fBfind_or_create_svc_handler_i\fR (SVC_HANDLER *&sh, const ACE_PEER_CONNECTOR_ADDR &remote_addr, \fBACE_Time_Value\fR *timeout, const ACE_PEER_CONNECTOR_ADDR &local_addr, int reuse_addr, int flags, int perms, \fBACE_Hash_Map_Entry\fR<\fBACE_Refcounted_Hash_Recyclable\fR<ACE_PEER_CONNECTOR_ADDR>, \fBACE_Pair\fR<SVC_HANDLER *, ATTRIBUTES> > *&entry, int &found)"
.br
.in -1c
.SS Protected Attributes

.in +1c
.ti -1c
.RI "size_t \fBmax_size_\fR"
.br
.RI "\fImax items in the cache, used as a bound for the creation of svc_handlers.\fR"
.in -1c
.SS Private Types

.in +1c
.ti -1c
.RI "typedef \fBACE_Cached_Connect_Strategy_Ex\fR<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX> \fBCCSEBASE\fR"
.br
.ti -1c
.RI "typedef \fBACE_Refcounted_Hash_Recyclable\fR<ACE_PEER_CONNECTOR_ADDR> \fBREFCOUNTED_HASH_RECYCLABLE_ADDRESS\fR"
.br
.in -1c
.SH DETAILED DESCRIPTION
.PP 

.SS template<class SVC_HANDLER, ACE_PEER_CONNECTOR_1, class CACHING_STRATEGY, class ATTRIBUTES, class MUTEX>  template class ACE_Bounded_Cached_Connect_Strategy
A connection strategy which caches connections to peers (represented by <SVC_HANDLER> instances), thereby allowing subsequent re-use of unused, but available, connections. This strategy should be used when the cache is bounded by maximum size.
.PP
.PP
 <Bounded_Cached_Connect_Strategy> is intended to be used as a plug-in connection strategy for . It's added value is re-use of established connections and tweaking the role of the cache as per the caching strategy. Thanks to Edan Ayal <edana@bandwiz.com> for contributing this class and Susan Liebeskind <shl@janis.gtri.gatech.edu> for brainstorming about it. 
.PP
.SH MEMBER TYPEDEF DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> typedef \fBACE_Cached_Connect_Strategy_Ex\fR<SVC_HANDLER, ACE_PEER_CONNECTOR_2, CACHING_STRATEGY, ATTRIBUTES, MUTEX> ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::CCSEBASE\fC [private]\fR
.PP
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> typedef \fBACE_Refcounted_Hash_Recyclable\fR<ACE_PEER_CONNECTOR_ADDR> ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::REFCOUNTED_HASH_RECYCLABLE_ADDRESS\fC [private]\fR
.PP
Reimplemented from \fBACE_Cached_Connect_Strategy_Ex\fR.
.SH CONSTRUCTOR & DESTRUCTOR DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX> (size_t max_size, CACHING_STRATEGY & caching_s, \fBACE_Creation_Strategy\fR< SVC_HANDLER >* cre_s = 0, \fBACE_Concurrency_Strategy\fR< SVC_HANDLER >* con_s = 0, \fBACE_Recycling_Strategy\fR< SVC_HANDLER >* rec_s = 0, MUTEX * lock = 0, int delete_lock = 0)
.PP
Constructor.
.PP
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::~ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX> (void)\fC [virtual]\fR
.PP
Destructor.
.PP
.SH MEMBER FUNCTION DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> virtual int ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::find_or_create_svc_handler_i (SVC_HANDLER *& sh, const ACE_PEER_CONNECTOR_ADDR & remote_addr, \fBACE_Time_Value\fR * timeout, const ACE_PEER_CONNECTOR_ADDR & local_addr, int reuse_addr, int flags, int perms, \fBACE_Hash_Map_Entry\fR< \fBACE_Refcounted_Hash_Recyclable\fR< ACE_PEER_CONNECTOR_ADDR >,\fBACE_Pair\fR< SVC_HANDLER *,ATTRIBUTES > >*& entry, int & found)\fC [protected, virtual]\fR
.PP
Reimplemented from \fBACE_Cached_Connect_Strategy_Ex\fR.
.SH MEMBER DATA DOCUMENTATION
.PP 
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::ACE_ALLOC_HOOK_DECLARE
.PP
Declare the dynamic allocation hooks.
.PP
Reimplemented from \fBACE_Connect_Strategy\fR.
.SS template<classSVC_HANDLER, ACE_PEER_CONNECTOR_1, classCACHING_STRATEGY, classATTRIBUTES, classMUTEX> size_t ACE_Bounded_Cached_Connect_Strategy<SVC_HANDLER, , CACHING_STRATEGY, ATTRIBUTES, MUTEX>::max_size_\fC [protected]\fR
.PP
max items in the cache, used as a bound for the creation of svc_handlers.
.PP


.SH AUTHOR
.PP 
Generated automatically by Doxygen for ACE from the source code.