mack-distributed 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README +106 -0
- data/bin/mack_ring_server +33 -0
- data/doc/classes/Mack/Distributable.html +137 -0
- data/doc/classes/Mack/Distributed/Errors/ApplicationNameUndefined.html +118 -0
- data/doc/classes/Mack/Distributed/Errors/InvalidAddressableURIFormat.html +152 -0
- data/doc/classes/Mack/Distributed/Errors/UnknownApplication.html +155 -0
- data/doc/classes/Mack/Distributed/Errors/UnknownRouteName.html +156 -0
- data/doc/classes/Mack/Distributed/Routes/Urls.html +213 -0
- data/doc/classes/Mack/Distributed/Utils/Rinda.html +230 -0
- data/doc/classes/Mack/Distributed/View.html +221 -0
- data/doc/classes/Mack/Distributed/ViewCache.html +170 -0
- data/doc/classes/Mack/Rendering/Type/Distributed.html +173 -0
- data/doc/classes/Mack/Rendering/Type/Layout.html +174 -0
- data/doc/classes/Mack/Routes/Urls.html +165 -0
- data/doc/created.rid +1 -0
- data/doc/files/README.html +272 -0
- data/doc/files/lib/mack-distributed/distributable_rb.html +101 -0
- data/doc/files/lib/mack-distributed/distributed_rb.html +101 -0
- data/doc/files/lib/mack-distributed/errors/errors_rb.html +101 -0
- data/doc/files/lib/mack-distributed/extensions/route_map_rb.html +101 -0
- data/doc/files/lib/mack-distributed/extensions/urls_rb.html +101 -0
- data/doc/files/lib/mack-distributed/routes/urls_rb.html +101 -0
- data/doc/files/lib/mack-distributed/utils/rinda_rb.html +101 -0
- data/doc/files/lib/mack-distributed/views/rendering/type/distributed_rb.html +101 -0
- data/doc/files/lib/mack-distributed/views/rendering/type/layout_rb.html +101 -0
- data/doc/files/lib/mack-distributed/views/view_cache_rb.html +101 -0
- data/doc/files/lib/mack-distributed/views/view_rb.html +101 -0
- data/doc/files/lib/mack-distributed_rb.html +110 -0
- data/doc/fr_class_index.html +38 -0
- data/doc/fr_file_index.html +39 -0
- data/doc/fr_method_index.html +43 -0
- data/doc/index.html +24 -0
- data/doc/rdoc-style.css +208 -0
- data/lib/mack-distributed/distributable.rb +68 -0
- data/lib/mack-distributed/distributed.rb +24 -0
- data/lib/mack-distributed/errors/errors.rb +33 -0
- data/lib/mack-distributed/extensions/route_map.rb +26 -0
- data/lib/mack-distributed/extensions/urls.rb +32 -0
- data/lib/mack-distributed/routes/urls.rb +51 -0
- data/lib/mack-distributed/tasks/ring_server_tasks.rake +33 -0
- data/lib/mack-distributed/utils/rinda.rb +48 -0
- data/lib/mack-distributed/views/rendering/type/distributed.rb +39 -0
- data/lib/mack-distributed/views/rendering/type/layout.rb +46 -0
- data/lib/mack-distributed/views/view.rb +41 -0
- data/lib/mack-distributed/views/view_cache.rb +32 -0
- data/lib/mack-distributed.rb +27 -0
- metadata +108 -0
@@ -0,0 +1,156 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Mack::Distributed::Errors::UnknownRouteName</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Mack::Distributed::Errors::UnknownRouteName</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/mack-distributed/errors/errors_rb.html">
|
59
|
+
lib/mack-distributed/errors/errors.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
StandardError
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
Raised when an unknown distributed route name for a distributed application
|
84
|
+
is referenced.
|
85
|
+
</p>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
<div id="method-list">
|
93
|
+
<h3 class="section-bar">Methods</h3>
|
94
|
+
|
95
|
+
<div class="name-list">
|
96
|
+
<a href="#M000004">new</a>
|
97
|
+
</div>
|
98
|
+
</div>
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<!-- if includes -->
|
104
|
+
|
105
|
+
<div id="section">
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
<!-- if method_list -->
|
115
|
+
<div id="methods">
|
116
|
+
<h3 class="section-bar">Public Class methods</h3>
|
117
|
+
|
118
|
+
<div id="method-M000004" class="method-detail">
|
119
|
+
<a name="M000004"></a>
|
120
|
+
|
121
|
+
<div class="method-heading">
|
122
|
+
<a href="#M000004" class="method-signature">
|
123
|
+
<span class="method-name">new</span><span class="method-args">(app_name, route_name)</span>
|
124
|
+
</a>
|
125
|
+
</div>
|
126
|
+
|
127
|
+
<div class="method-description">
|
128
|
+
<p>
|
129
|
+
Takes the application name and the route name.
|
130
|
+
</p>
|
131
|
+
<p><a class="source-toggle" href="#"
|
132
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
133
|
+
<div class="method-source-code" id="M000004-source">
|
134
|
+
<pre>
|
135
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/errors/errors.rb, line 16</span>
|
136
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">app_name</span>, <span class="ruby-identifier">route_name</span>)
|
137
|
+
17: <span class="ruby-keyword kw">super</span>(<span class="ruby-node">"ROUTE_NAME: #{route_name}, is not a known/registered distributed route name for application: #{app_name}."</span>)
|
138
|
+
18: <span class="ruby-keyword kw">end</span>
|
139
|
+
</pre>
|
140
|
+
</div>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
|
144
|
+
|
145
|
+
</div>
|
146
|
+
|
147
|
+
|
148
|
+
</div>
|
149
|
+
|
150
|
+
|
151
|
+
<div id="validator-badges">
|
152
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
153
|
+
</div>
|
154
|
+
|
155
|
+
</body>
|
156
|
+
</html>
|
@@ -0,0 +1,213 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Mack::Distributed::Routes::Urls</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Mack::Distributed::Routes::Urls</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/mack-distributed/routes/urls_rb.html">
|
59
|
+
lib/mack-distributed/routes/urls.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
A class used to house the Mack::Routes::Url module for distributed
|
84
|
+
applications. Functionally this class does nothing, but since you
|
85
|
+
can‘t cache a module, a class is needed.
|
86
|
+
</p>
|
87
|
+
|
88
|
+
</div>
|
89
|
+
|
90
|
+
|
91
|
+
</div>
|
92
|
+
|
93
|
+
<div id="method-list">
|
94
|
+
<h3 class="section-bar">Methods</h3>
|
95
|
+
|
96
|
+
<div class="name-list">
|
97
|
+
<a href="#M000012">get</a>
|
98
|
+
<a href="#M000010">put</a>
|
99
|
+
<a href="#M000011">run</a>
|
100
|
+
</div>
|
101
|
+
</div>
|
102
|
+
|
103
|
+
</div>
|
104
|
+
|
105
|
+
|
106
|
+
<!-- if includes -->
|
107
|
+
<div id="includes">
|
108
|
+
<h3 class="section-bar">Included Modules</h3>
|
109
|
+
|
110
|
+
<div id="includes-list">
|
111
|
+
<span class="include-name">DRbUndumped</span>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
|
115
|
+
<div id="section">
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<!-- if method_list -->
|
125
|
+
<div id="methods">
|
126
|
+
<h3 class="section-bar">Public Class methods</h3>
|
127
|
+
|
128
|
+
<div id="method-M000012" class="method-detail">
|
129
|
+
<a name="M000012"></a>
|
130
|
+
|
131
|
+
<div class="method-heading">
|
132
|
+
<a href="#M000012" class="method-signature">
|
133
|
+
<span class="method-name">get</span><span class="method-args">(app_name)</span>
|
134
|
+
</a>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="method-description">
|
138
|
+
<p><a class="source-toggle" href="#"
|
139
|
+
onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
|
140
|
+
<div class="method-source-code" id="M000012-source">
|
141
|
+
<pre>
|
142
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/routes/urls.rb, line 25</span>
|
143
|
+
25: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">app_name</span>)
|
144
|
+
26: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Rinda</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">:space</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">app_name</span>.<span class="ruby-identifier">to_sym</span>, <span class="ruby-identifier">:klass_def</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:distributed_routes</span>)
|
145
|
+
27: <span class="ruby-keyword kw">end</span>
|
146
|
+
</pre>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
</div>
|
150
|
+
|
151
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
152
|
+
|
153
|
+
<div id="method-M000010" class="method-detail">
|
154
|
+
<a name="M000010"></a>
|
155
|
+
|
156
|
+
<div class="method-heading">
|
157
|
+
<a href="#M000010" class="method-signature">
|
158
|
+
<span class="method-name">put</span><span class="method-args">()</span>
|
159
|
+
</a>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
<div class="method-description">
|
163
|
+
<p><a class="source-toggle" href="#"
|
164
|
+
onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
|
165
|
+
<div class="method-source-code" id="M000010-source">
|
166
|
+
<pre>
|
167
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/routes/urls.rb, line 13</span>
|
168
|
+
13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put</span>
|
169
|
+
14: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Distributed</span><span class="ruby-operator">::</span><span class="ruby-constant">Utils</span><span class="ruby-operator">::</span><span class="ruby-constant">Rinda</span>.<span class="ruby-identifier">register_or_renew</span>(<span class="ruby-identifier">:space</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">mack</span>.<span class="ruby-identifier">distributed_app_name</span>.<span class="ruby-identifier">to_sym</span>,
|
170
|
+
15: <span class="ruby-identifier">:klass_def</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">:distributed_routes</span>,
|
171
|
+
16: <span class="ruby-identifier">:object</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">:timeout</span> =<span class="ruby-operator">></span> <span class="ruby-value">0</span>)
|
172
|
+
17: <span class="ruby-keyword kw">end</span>
|
173
|
+
</pre>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
<div id="method-M000011" class="method-detail">
|
179
|
+
<a name="M000011"></a>
|
180
|
+
|
181
|
+
<div class="method-heading">
|
182
|
+
<a href="#M000011" class="method-signature">
|
183
|
+
<span class="method-name">run</span><span class="method-args">(meth, options)</span>
|
184
|
+
</a>
|
185
|
+
</div>
|
186
|
+
|
187
|
+
<div class="method-description">
|
188
|
+
<p><a class="source-toggle" href="#"
|
189
|
+
onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
|
190
|
+
<div class="method-source-code" id="M000011-source">
|
191
|
+
<pre>
|
192
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/routes/urls.rb, line 19</span>
|
193
|
+
19: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-identifier">options</span>)
|
194
|
+
20: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">meth</span>, <span class="ruby-identifier">options</span>)
|
195
|
+
21: <span class="ruby-keyword kw">end</span>
|
196
|
+
</pre>
|
197
|
+
</div>
|
198
|
+
</div>
|
199
|
+
</div>
|
200
|
+
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
|
205
|
+
</div>
|
206
|
+
|
207
|
+
|
208
|
+
<div id="validator-badges">
|
209
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</body>
|
213
|
+
</html>
|
@@ -0,0 +1,230 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: Mack::Distributed::Utils::Rinda</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">Mack::Distributed::Utils::Rinda</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../../../../files/lib/mack-distributed/utils/rinda_rb.html">
|
59
|
+
lib/mack-distributed/utils/rinda.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
</table>
|
66
|
+
</div>
|
67
|
+
<!-- banner header -->
|
68
|
+
|
69
|
+
<div id="bodyContent">
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
<div id="contextContent">
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
</div>
|
78
|
+
|
79
|
+
<div id="method-list">
|
80
|
+
<h3 class="section-bar">Methods</h3>
|
81
|
+
|
82
|
+
<div class="name-list">
|
83
|
+
<a href="#M000009">read</a>
|
84
|
+
<a href="#M000007">register</a>
|
85
|
+
<a href="#M000006">register_or_renew</a>
|
86
|
+
<a href="#M000008">ring_server</a>
|
87
|
+
</div>
|
88
|
+
</div>
|
89
|
+
|
90
|
+
</div>
|
91
|
+
|
92
|
+
|
93
|
+
<!-- if includes -->
|
94
|
+
|
95
|
+
<div id="section">
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if method_list -->
|
105
|
+
<div id="methods">
|
106
|
+
<h3 class="section-bar">Public Class methods</h3>
|
107
|
+
|
108
|
+
<div id="method-M000009" class="method-detail">
|
109
|
+
<a name="M000009"></a>
|
110
|
+
|
111
|
+
<div class="method-heading">
|
112
|
+
<a href="#M000009" class="method-signature">
|
113
|
+
<span class="method-name">read</span><span class="method-args">(options = {})</span>
|
114
|
+
</a>
|
115
|
+
</div>
|
116
|
+
|
117
|
+
<div class="method-description">
|
118
|
+
<p><a class="source-toggle" href="#"
|
119
|
+
onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
|
120
|
+
<div class="method-source-code" id="M000009-source">
|
121
|
+
<pre>
|
122
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/utils/rinda.rb, line 35</span>
|
123
|
+
35: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">options</span> = {})
|
124
|
+
36: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">handle_options</span>(<span class="ruby-identifier">options</span>)
|
125
|
+
37: <span class="ruby-identifier">ring_server</span>.<span class="ruby-identifier">read</span>([<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:space</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:klass_def</span>], <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:description</span>]], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:timeout</span>])[<span class="ruby-value">2</span>]
|
126
|
+
38: <span class="ruby-keyword kw">end</span>
|
127
|
+
</pre>
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
</div>
|
131
|
+
|
132
|
+
<div id="method-M000007" class="method-detail">
|
133
|
+
<a name="M000007"></a>
|
134
|
+
|
135
|
+
<div class="method-heading">
|
136
|
+
<a href="#M000007" class="method-signature">
|
137
|
+
<span class="method-name">register</span><span class="method-args">(options = {})</span>
|
138
|
+
</a>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
<div class="method-description">
|
142
|
+
<p><a class="source-toggle" href="#"
|
143
|
+
onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
|
144
|
+
<div class="method-source-code" id="M000007-source">
|
145
|
+
<pre>
|
146
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/utils/rinda.rb, line 16</span>
|
147
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">register</span>(<span class="ruby-identifier">options</span> = {})
|
148
|
+
17: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">handle_options</span>(<span class="ruby-identifier">options</span>)
|
149
|
+
18: <span class="ruby-identifier">ring_server</span>.<span class="ruby-identifier">write</span>([<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:space</span>],
|
150
|
+
19: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:klass_def</span>],
|
151
|
+
20: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:object</span>],
|
152
|
+
21: <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:description</span>]],
|
153
|
+
22: <span class="ruby-operator">::</span><span class="ruby-constant">Rinda</span><span class="ruby-operator">::</span><span class="ruby-constant">SimpleRenewer</span>.<span class="ruby-identifier">new</span>)
|
154
|
+
23: <span class="ruby-keyword kw">end</span>
|
155
|
+
</pre>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
<div id="method-M000006" class="method-detail">
|
161
|
+
<a name="M000006"></a>
|
162
|
+
|
163
|
+
<div class="method-heading">
|
164
|
+
<a href="#M000006" class="method-signature">
|
165
|
+
<span class="method-name">register_or_renew</span><span class="method-args">(options = {})</span>
|
166
|
+
</a>
|
167
|
+
</div>
|
168
|
+
|
169
|
+
<div class="method-description">
|
170
|
+
<p><a class="source-toggle" href="#"
|
171
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
172
|
+
<div class="method-source-code" id="M000006-source">
|
173
|
+
<pre>
|
174
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/utils/rinda.rb, line 6</span>
|
175
|
+
6: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">register_or_renew</span>(<span class="ruby-identifier">options</span> = {})
|
176
|
+
7: <span class="ruby-identifier">options</span> = <span class="ruby-identifier">handle_options</span>(<span class="ruby-identifier">options</span>)
|
177
|
+
8: <span class="ruby-keyword kw">begin</span>
|
178
|
+
9: <span class="ruby-identifier">ring_server</span>.<span class="ruby-identifier">take</span>([<span class="ruby-identifier">options</span>[<span class="ruby-identifier">:space</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:klass_def</span>], <span class="ruby-keyword kw">nil</span>, <span class="ruby-keyword kw">nil</span>], <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:timeout</span>])
|
179
|
+
10: <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
180
|
+
11: <span class="ruby-comment cmt"># Mack.logger.error(e)</span>
|
181
|
+
12: <span class="ruby-keyword kw">end</span>
|
182
|
+
13: <span class="ruby-identifier">register</span>(<span class="ruby-identifier">options</span>)
|
183
|
+
14: <span class="ruby-keyword kw">end</span>
|
184
|
+
</pre>
|
185
|
+
</div>
|
186
|
+
</div>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
<div id="method-M000008" class="method-detail">
|
190
|
+
<a name="M000008"></a>
|
191
|
+
|
192
|
+
<div class="method-heading">
|
193
|
+
<a href="#M000008" class="method-signature">
|
194
|
+
<span class="method-name">ring_server</span><span class="method-args">()</span>
|
195
|
+
</a>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
<div class="method-description">
|
199
|
+
<p><a class="source-toggle" href="#"
|
200
|
+
onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
|
201
|
+
<div class="method-source-code" id="M000008-source">
|
202
|
+
<pre>
|
203
|
+
<span class="ruby-comment cmt"># File lib/mack-distributed/utils/rinda.rb, line 25</span>
|
204
|
+
25: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">ring_server</span>
|
205
|
+
26: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">mack</span>.<span class="ruby-identifier">distributed_acl</span>
|
206
|
+
27: <span class="ruby-identifier">acl</span> = <span class="ruby-constant">ACL</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">app_config</span>.<span class="ruby-identifier">mack</span>.<span class="ruby-identifier">distributed_acl</span>)
|
207
|
+
28: <span class="ruby-constant">DRb</span>.<span class="ruby-identifier">install_acl</span>(<span class="ruby-identifier">acl</span>)
|
208
|
+
29: <span class="ruby-keyword kw">end</span>
|
209
|
+
30: <span class="ruby-operator">::</span><span class="ruby-constant">DRb</span>.<span class="ruby-identifier">start_service</span>
|
210
|
+
31: <span class="ruby-identifier">rs</span> = <span class="ruby-operator">::</span><span class="ruby-constant">Rinda</span><span class="ruby-operator">::</span><span class="ruby-constant">RingFinger</span>.<span class="ruby-identifier">primary</span>
|
211
|
+
32: <span class="ruby-identifier">rs</span>
|
212
|
+
33: <span class="ruby-keyword kw">end</span>
|
213
|
+
</pre>
|
214
|
+
</div>
|
215
|
+
</div>
|
216
|
+
</div>
|
217
|
+
|
218
|
+
|
219
|
+
</div>
|
220
|
+
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
|
225
|
+
<div id="validator-badges">
|
226
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
227
|
+
</div>
|
228
|
+
|
229
|
+
</body>
|
230
|
+
</html>
|