1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
---|
2 | <!--NewPage--> |
---|
3 | <HTML> |
---|
4 | <HEAD> |
---|
5 | <!-- Generated by javadoc (build 1.6.0_18) on Tue Dec 11 11:47:11 GMT 2012 --> |
---|
6 | <TITLE> |
---|
7 | WorkPool |
---|
8 | </TITLE> |
---|
9 | |
---|
10 | <META NAME="date" CONTENT="2012-12-11"> |
---|
11 | |
---|
12 | <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
---|
13 | |
---|
14 | <SCRIPT type="text/javascript"> |
---|
15 | function windowTitle() |
---|
16 | { |
---|
17 | if (location.href.indexOf('is-external=true') == -1) { |
---|
18 | parent.document.title="WorkPool"; |
---|
19 | } |
---|
20 | } |
---|
21 | </SCRIPT> |
---|
22 | <NOSCRIPT> |
---|
23 | </NOSCRIPT> |
---|
24 | |
---|
25 | </HEAD> |
---|
26 | |
---|
27 | <BODY BGCOLOR="white" onload="windowTitle();"> |
---|
28 | <HR> |
---|
29 | |
---|
30 | |
---|
31 | <!-- ========= START OF TOP NAVBAR ======= --> |
---|
32 | <A NAME="navbar_top"><!-- --></A> |
---|
33 | <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
---|
34 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
35 | <TR> |
---|
36 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
37 | <A NAME="navbar_top_firstrow"><!-- --></A> |
---|
38 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
39 | <TR ALIGN="center" VALIGN="top"> |
---|
40 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
41 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
42 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
43 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
44 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
45 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
46 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
47 | </TR> |
---|
48 | </TABLE> |
---|
49 | </TD> |
---|
50 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
51 | </EM> |
---|
52 | </TD> |
---|
53 | </TR> |
---|
54 | |
---|
55 | <TR> |
---|
56 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
57 | <A HREF="../../../../com/rabbitmq/client/impl/Version.html" title="class in com.rabbitmq.client.impl"><B>PREV CLASS</B></A> |
---|
58 | NEXT CLASS</FONT></TD> |
---|
59 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
60 | <A HREF="../../../../index.html?com/rabbitmq/client/impl/WorkPool.html" target="_top"><B>FRAMES</B></A> |
---|
61 | <A HREF="WorkPool.html" target="_top"><B>NO FRAMES</B></A> |
---|
62 | <SCRIPT type="text/javascript"> |
---|
63 | <!-- |
---|
64 | if(window==top) { |
---|
65 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
66 | } |
---|
67 | //--> |
---|
68 | </SCRIPT> |
---|
69 | <NOSCRIPT> |
---|
70 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
71 | </NOSCRIPT> |
---|
72 | |
---|
73 | |
---|
74 | </FONT></TD> |
---|
75 | </TR> |
---|
76 | <TR> |
---|
77 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
78 | SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
79 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
80 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
81 | </TR> |
---|
82 | </TABLE> |
---|
83 | <A NAME="skip-navbar_top"></A> |
---|
84 | <!-- ========= END OF TOP NAVBAR ========= --> |
---|
85 | |
---|
86 | <HR> |
---|
87 | <!-- ======== START OF CLASS DATA ======== --> |
---|
88 | <H2> |
---|
89 | <FONT SIZE="-1"> |
---|
90 | com.rabbitmq.client.impl</FONT> |
---|
91 | <BR> |
---|
92 | Class WorkPool<K,W></H2> |
---|
93 | <PRE> |
---|
94 | java.lang.Object |
---|
95 | <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>com.rabbitmq.client.impl.WorkPool<K,W></B> |
---|
96 | </PRE> |
---|
97 | <DL> |
---|
98 | <DT><DT><B>Type Parameters:</B><DD><CODE>K</CODE> - Key -- type of client<DD><CODE>W</CODE> - Work -- type of work item</DL> |
---|
99 | <HR> |
---|
100 | <DL> |
---|
101 | <DT><PRE>public class <B>WorkPool<K,W></B><DT>extends java.lang.Object</DL> |
---|
102 | </PRE> |
---|
103 | |
---|
104 | <P> |
---|
105 | This is a generic implementation of the <q>Channels</q> specification |
---|
106 | in <i>Channeling Work</i>, Nov 2010 (<tt>channels.pdf</tt>). |
---|
107 | <p/> |
---|
108 | Objects of type <b>K</b> must be registered, with <code><b>registerKey(K)</b></code>, |
---|
109 | and then they become <i>clients</i> and a queue of |
---|
110 | items (type <b>W</b>) is stored for each client. |
---|
111 | <p/> |
---|
112 | Each client has a <i>state</i> which is exactly one of <i>dormant</i>, |
---|
113 | <i>in progress</i> or <i>ready</i>. Immediately after registration a client is <i>dormant</i>. |
---|
114 | <p/> |
---|
115 | Items may be (singly) added to (the end of) a client's queue with <code><b>addWorkItem(K,W)</b></code>. |
---|
116 | If the client is <i>dormant</i> it becomes <i>ready</i> thereby. All other states remain unchanged. |
---|
117 | <p/> |
---|
118 | The next <i>ready</i> client, together with a collection of its items, |
---|
119 | may be retrieved with <code><b>nextWorkBlock(collection,max)</b></code> |
---|
120 | (making that client <i>in progress</i>). |
---|
121 | <p/> |
---|
122 | An <i>in progress</i> client can finish (processing a batch of items) with <code><b>finishWorkBlock(K)</b></code>. |
---|
123 | It then becomes either <i>dormant</i> or <i>ready</i>, depending if its queue of work items is empty or no. |
---|
124 | <p/> |
---|
125 | If a client has items queued, it is either <i>in progress</i> or <i>ready</i> but cannot be both. |
---|
126 | When work is finished it may be marked <i>ready</i> if there is further work, |
---|
127 | or <i>dormant</i> if there is not. |
---|
128 | There is never any work for a <i>dormant</i> client. |
---|
129 | <p/> |
---|
130 | A client may be unregistered, with <code><b>unregisterKey(K)</b></code>, which removes the client from |
---|
131 | all parts of the state, and any queue of items stored with it. |
---|
132 | All clients may be unregistered with <code><b>unregisterAllKeys()</b></code>. |
---|
133 | <p/> |
---|
134 | <b>Concurrent Semantics</b><br/> |
---|
135 | This implementation is thread-safe. |
---|
136 | <p/> |
---|
137 | <b>Implementation Notes</b><br/> |
---|
138 | The state is, roughly, as follows: |
---|
139 | <pre> pool :: <i>map</i>(K, <i>seq</i> W) |
---|
140 | inProgress :: <i>set</i> K |
---|
141 | ready :: <i>iseq</i> K</pre> |
---|
142 | <p/> |
---|
143 | where a <code><i>seq</i></code> is a sequence (queue or list) and an <code><i>iseq</i></code> |
---|
144 | (<i>i</i> for <i>i</i>njective) is a sequence with no duplicates. |
---|
145 | <p/> |
---|
146 | <b>State transitions</b><br/><pre> |
---|
147 | finish(k) ------------- |
---|
148 | -----------> | (dormant) | |
---|
149 | | ------------- |
---|
150 | ------------- next() | add(item) |
---|
151 | | in progress | <--------- | |
---|
152 | ------------- | V |
---|
153 | | ------------- |
---|
154 | -----------> | ready | |
---|
155 | finish(k) ------------- |
---|
156 | </pre> |
---|
157 | <i>dormant</i> is not represented in the implementation state, and adding items |
---|
158 | when the client is <i>in progress</i> or <i>ready</i> does not change its state. |
---|
159 | <P> |
---|
160 | |
---|
161 | <P> |
---|
162 | <HR> |
---|
163 | |
---|
164 | <P> |
---|
165 | |
---|
166 | <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
---|
167 | |
---|
168 | <A NAME="constructor_summary"><!-- --></A> |
---|
169 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
170 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
171 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
172 | <B>Constructor Summary</B></FONT></TH> |
---|
173 | </TR> |
---|
174 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
175 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#WorkPool()">WorkPool</A></B>()</CODE> |
---|
176 | |
---|
177 | <BR> |
---|
178 | </TD> |
---|
179 | </TR> |
---|
180 | </TABLE> |
---|
181 | |
---|
182 | <!-- ========== METHOD SUMMARY =========== --> |
---|
183 | |
---|
184 | <A NAME="method_summary"><!-- --></A> |
---|
185 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
186 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
187 | <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
---|
188 | <B>Method Summary</B></FONT></TH> |
---|
189 | </TR> |
---|
190 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
191 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
192 | <CODE> boolean</CODE></FONT></TD> |
---|
193 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#addWorkItem(K, W)">addWorkItem</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key, |
---|
194 | <A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">W</A> item)</CODE> |
---|
195 | |
---|
196 | <BR> |
---|
197 | Add (enqueue) an item for a specific client.</TD> |
---|
198 | </TR> |
---|
199 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
200 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
201 | <CODE> boolean</CODE></FONT></TD> |
---|
202 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#finishWorkBlock(K)">finishWorkBlock</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key)</CODE> |
---|
203 | |
---|
204 | <BR> |
---|
205 | Set client no longer <i>in progress</i>.</TD> |
---|
206 | </TR> |
---|
207 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
208 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
209 | <CODE> <A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A></CODE></FONT></TD> |
---|
210 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#nextWorkBlock(java.util.Collection, int)">nextWorkBlock</A></B>(java.util.Collection<<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">W</A>> to, |
---|
211 | int size)</CODE> |
---|
212 | |
---|
213 | <BR> |
---|
214 | Return the next <i>ready</i> client, |
---|
215 | and transfer a collection of that client's items to process.</TD> |
---|
216 | </TR> |
---|
217 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
218 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
219 | <CODE> void</CODE></FONT></TD> |
---|
220 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#registerKey(K)">registerKey</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key)</CODE> |
---|
221 | |
---|
222 | <BR> |
---|
223 | Add client <code><b>key</b></code> to pool of item queues, with an empty queue.</TD> |
---|
224 | </TR> |
---|
225 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
226 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
227 | <CODE> void</CODE></FONT></TD> |
---|
228 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#unregisterAllKeys()">unregisterAllKeys</A></B>()</CODE> |
---|
229 | |
---|
230 | <BR> |
---|
231 | Remove all clients from pool and from any other state.</TD> |
---|
232 | </TR> |
---|
233 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
234 | <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
---|
235 | <CODE> void</CODE></FONT></TD> |
---|
236 | <TD><CODE><B><A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html#unregisterKey(K)">unregisterKey</A></B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key)</CODE> |
---|
237 | |
---|
238 | <BR> |
---|
239 | Remove client from pool and from any other state.</TD> |
---|
240 | </TR> |
---|
241 | </TABLE> |
---|
242 | <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
---|
243 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
244 | <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
---|
245 | <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> |
---|
246 | </TR> |
---|
247 | <TR BGCOLOR="white" CLASS="TableRowColor"> |
---|
248 | <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> |
---|
249 | </TR> |
---|
250 | </TABLE> |
---|
251 | |
---|
252 | <P> |
---|
253 | |
---|
254 | <!-- ========= CONSTRUCTOR DETAIL ======== --> |
---|
255 | |
---|
256 | <A NAME="constructor_detail"><!-- --></A> |
---|
257 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
258 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
259 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
260 | <B>Constructor Detail</B></FONT></TH> |
---|
261 | </TR> |
---|
262 | </TABLE> |
---|
263 | |
---|
264 | <A NAME="WorkPool()"><!-- --></A><H3> |
---|
265 | WorkPool</H3> |
---|
266 | <PRE> |
---|
267 | public <B>WorkPool</B>()</PRE> |
---|
268 | <DL> |
---|
269 | </DL> |
---|
270 | |
---|
271 | <!-- ============ METHOD DETAIL ========== --> |
---|
272 | |
---|
273 | <A NAME="method_detail"><!-- --></A> |
---|
274 | <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
---|
275 | <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
---|
276 | <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
---|
277 | <B>Method Detail</B></FONT></TH> |
---|
278 | </TR> |
---|
279 | </TABLE> |
---|
280 | |
---|
281 | <A NAME="registerKey(java.lang.Object)"><!-- --></A><A NAME="registerKey(K)"><!-- --></A><H3> |
---|
282 | registerKey</H3> |
---|
283 | <PRE> |
---|
284 | public void <B>registerKey</B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key)</PRE> |
---|
285 | <DL> |
---|
286 | <DD>Add client <code><b>key</b></code> to pool of item queues, with an empty queue. |
---|
287 | A client is initially <i>dormant</i>. |
---|
288 | <p/> |
---|
289 | No-op if <code><b>key</b></code> already present. |
---|
290 | <P> |
---|
291 | <DD><DL> |
---|
292 | <DT><B>Parameters:</B><DD><CODE>key</CODE> - client to add to pool</DL> |
---|
293 | </DD> |
---|
294 | </DL> |
---|
295 | <HR> |
---|
296 | |
---|
297 | <A NAME="unregisterKey(java.lang.Object)"><!-- --></A><A NAME="unregisterKey(K)"><!-- --></A><H3> |
---|
298 | unregisterKey</H3> |
---|
299 | <PRE> |
---|
300 | public void <B>unregisterKey</B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key)</PRE> |
---|
301 | <DL> |
---|
302 | <DD>Remove client from pool and from any other state. Has no effect if client already absent. |
---|
303 | <P> |
---|
304 | <DD><DL> |
---|
305 | <DT><B>Parameters:</B><DD><CODE>key</CODE> - of client to unregister</DL> |
---|
306 | </DD> |
---|
307 | </DL> |
---|
308 | <HR> |
---|
309 | |
---|
310 | <A NAME="unregisterAllKeys()"><!-- --></A><H3> |
---|
311 | unregisterAllKeys</H3> |
---|
312 | <PRE> |
---|
313 | public void <B>unregisterAllKeys</B>()</PRE> |
---|
314 | <DL> |
---|
315 | <DD>Remove all clients from pool and from any other state. |
---|
316 | <P> |
---|
317 | <DD><DL> |
---|
318 | </DL> |
---|
319 | </DD> |
---|
320 | </DL> |
---|
321 | <HR> |
---|
322 | |
---|
323 | <A NAME="nextWorkBlock(java.util.Collection, int)"><!-- --></A><H3> |
---|
324 | nextWorkBlock</H3> |
---|
325 | <PRE> |
---|
326 | public <A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> <B>nextWorkBlock</B>(java.util.Collection<<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">W</A>> to, |
---|
327 | int size)</PRE> |
---|
328 | <DL> |
---|
329 | <DD>Return the next <i>ready</i> client, |
---|
330 | and transfer a collection of that client's items to process. |
---|
331 | Mark client <i>in progress</i>. |
---|
332 | <p/> |
---|
333 | If there is no <i>ready</i> client, return <code><b>null</b></code>. |
---|
334 | <P> |
---|
335 | <DD><DL> |
---|
336 | <DT><B>Parameters:</B><DD><CODE>to</CODE> - collection object in which to transfer items<DD><CODE>size</CODE> - max number of items to transfer |
---|
337 | <DT><B>Returns:</B><DD>key of client to whom items belong, or <code><b>null</b></code> if there is none.</DL> |
---|
338 | </DD> |
---|
339 | </DL> |
---|
340 | <HR> |
---|
341 | |
---|
342 | <A NAME="addWorkItem(java.lang.Object,java.lang.Object)"><!-- --></A><A NAME="addWorkItem(K, W)"><!-- --></A><H3> |
---|
343 | addWorkItem</H3> |
---|
344 | <PRE> |
---|
345 | public boolean <B>addWorkItem</B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key, |
---|
346 | <A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">W</A> item)</PRE> |
---|
347 | <DL> |
---|
348 | <DD>Add (enqueue) an item for a specific client. |
---|
349 | No change and returns <code><b>false</b></code> if client not registered. |
---|
350 | If <i>dormant</i>, the client will be marked <i>ready</i>. |
---|
351 | <P> |
---|
352 | <DD><DL> |
---|
353 | <DT><B>Parameters:</B><DD><CODE>key</CODE> - the client to add to the work item to<DD><CODE>item</CODE> - the work item to add to the client queue |
---|
354 | <DT><B>Returns:</B><DD><code><b>true</b></code> if and only if the client is marked <i>ready</i> |
---|
355 | — <i>as a result of this work item</i></DL> |
---|
356 | </DD> |
---|
357 | </DL> |
---|
358 | <HR> |
---|
359 | |
---|
360 | <A NAME="finishWorkBlock(java.lang.Object)"><!-- --></A><A NAME="finishWorkBlock(K)"><!-- --></A><H3> |
---|
361 | finishWorkBlock</H3> |
---|
362 | <PRE> |
---|
363 | public boolean <B>finishWorkBlock</B>(<A HREF="../../../../com/rabbitmq/client/impl/WorkPool.html" title="type parameter in WorkPool">K</A> key)</PRE> |
---|
364 | <DL> |
---|
365 | <DD>Set client no longer <i>in progress</i>. |
---|
366 | Ignore unknown clients (and return <code><b>false</b></code>). |
---|
367 | <P> |
---|
368 | <DD><DL> |
---|
369 | <DT><B>Parameters:</B><DD><CODE>key</CODE> - client that has finished work |
---|
370 | <DT><B>Returns:</B><DD><code><b>true</b></code> if and only if client becomes <i>ready</i> |
---|
371 | <DT><B>Throws:</B> |
---|
372 | <DD><CODE>java.lang.IllegalStateException</CODE> - if registered client not <i>in progress</i></DL> |
---|
373 | </DD> |
---|
374 | </DL> |
---|
375 | <!-- ========= END OF CLASS DATA ========= --> |
---|
376 | <HR> |
---|
377 | |
---|
378 | |
---|
379 | <!-- ======= START OF BOTTOM NAVBAR ====== --> |
---|
380 | <A NAME="navbar_bottom"><!-- --></A> |
---|
381 | <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
---|
382 | <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
---|
383 | <TR> |
---|
384 | <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
---|
385 | <A NAME="navbar_bottom_firstrow"><!-- --></A> |
---|
386 | <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
---|
387 | <TR ALIGN="center" VALIGN="top"> |
---|
388 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
---|
389 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
---|
390 | <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
---|
391 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
---|
392 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
---|
393 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
---|
394 | <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
---|
395 | </TR> |
---|
396 | </TABLE> |
---|
397 | </TD> |
---|
398 | <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
---|
399 | </EM> |
---|
400 | </TD> |
---|
401 | </TR> |
---|
402 | |
---|
403 | <TR> |
---|
404 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
405 | <A HREF="../../../../com/rabbitmq/client/impl/Version.html" title="class in com.rabbitmq.client.impl"><B>PREV CLASS</B></A> |
---|
406 | NEXT CLASS</FONT></TD> |
---|
407 | <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
---|
408 | <A HREF="../../../../index.html?com/rabbitmq/client/impl/WorkPool.html" target="_top"><B>FRAMES</B></A> |
---|
409 | <A HREF="WorkPool.html" target="_top"><B>NO FRAMES</B></A> |
---|
410 | <SCRIPT type="text/javascript"> |
---|
411 | <!-- |
---|
412 | if(window==top) { |
---|
413 | document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
---|
414 | } |
---|
415 | //--> |
---|
416 | </SCRIPT> |
---|
417 | <NOSCRIPT> |
---|
418 | <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A> |
---|
419 | </NOSCRIPT> |
---|
420 | |
---|
421 | |
---|
422 | </FONT></TD> |
---|
423 | </TR> |
---|
424 | <TR> |
---|
425 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
426 | SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> |
---|
427 | <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
---|
428 | DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> |
---|
429 | </TR> |
---|
430 | </TABLE> |
---|
431 | <A NAME="skip-navbar_bottom"></A> |
---|
432 | <!-- ======== END OF BOTTOM NAVBAR ======= --> |
---|
433 | |
---|
434 | <HR> |
---|
435 | |
---|
436 | </BODY> |
---|
437 | </HTML> |
---|