@@ -10,10 +10,10 @@ public interface RingBuffer<T> {
1010 interface Supplier <T > {
1111 /**
1212 * This method will return the next value to be written to the queue. As such the queue
13- * implementations are commited to insert the value once the call is made.
13+ * implementations are committed to insert the value once the call is made.
1414 *
1515 * <p>Users should be aware that underlying queue implementations may upfront claim parts of the
16- * queue for batch operations and this will effect the view on the queue from the supplier
16+ * queue for batch operations and this will affect the view on the queue from the supplier
1717 * method. In particular size and any offer methods may take the view that the full batch has
1818 * already happened.
1919 *
@@ -51,8 +51,6 @@ interface WaitStrategy {
5151 * This method can implement static or dynamic backoff. Dynamic backoff will rely on the counter
5252 * for estimating how long the caller has been idling. The expected usage is:
5353 *
54- * <p>
55- *
5654 * <pre>
5755 * <code>
5856 * int ic = 0;
@@ -172,8 +170,6 @@ interface ExitCondition {
172170 * Remove up to <i>limit</i> elements from the queue and hand to consume. This should be
173171 * semantically similar to:
174172 *
175- * <p>
176- *
177173 * <pre>{@code
178174 * M m;
179175 * int i = 0;
@@ -189,6 +185,8 @@ interface ExitCondition {
189185 * <p><b>WARNING</b>: Explicit assumptions are made with regards to {@link Consumer#accept} make
190186 * sure you have read and understood these before using this method.
191187 *
188+ * @param c the consumer
189+ * @param limit the limit
192190 * @return the number of polled elements
193191 * @throws IllegalArgumentException c is {@code null}
194192 * @throws IllegalArgumentException if limit is negative
@@ -198,8 +196,6 @@ interface ExitCondition {
198196 /**
199197 * Stuff the queue with up to <i>limit</i> elements from the supplier. Semantically similar to:
200198 *
201- * <p>
202- *
203199 * <pre>{@code
204200 * for(int i=0; i < limit && relaxedOffer(s.get()); i++);
205201 * }</pre>
@@ -210,6 +206,8 @@ interface ExitCondition {
210206 * <p><b>WARNING</b>: Explicit assumptions are made with regards to {@link Supplier#get} make sure
211207 * you have read and understood these before using this method.
212208 *
209+ * @param s the supplier
210+ * @param limit the limit
213211 * @return the number of offered elements
214212 * @throws IllegalArgumentException s is {@code null}
215213 * @throws IllegalArgumentException if limit is negative
@@ -233,6 +231,7 @@ interface ExitCondition {
233231 * <p><b>WARNING</b>: Explicit assumptions are made with regards to {@link Consumer#accept} make
234232 * sure you have read and understood these before using this method.
235233 *
234+ * @param c the consumer
236235 * @return the number of polled elements
237236 * @throws IllegalArgumentException c is {@code null}
238237 */
@@ -253,6 +252,7 @@ interface ExitCondition {
253252 * <p><b>WARNING</b>: Explicit assumptions are made with regards to {@link Supplier#get} make sure
254253 * you have read and understood these before using this method.
255254 *
255+ * @param s the supplier
256256 * @return the number of offered elements
257257 * @throws IllegalArgumentException s is {@code null}
258258 */
@@ -261,8 +261,6 @@ interface ExitCondition {
261261 /**
262262 * Remove elements from the queue and hand to consume forever. Semantically similar to:
263263 *
264- * <p>
265- *
266264 * <pre>
267265 * int idleCounter = 0;
268266 * while (exit.keepRunning()) {
@@ -281,15 +279,16 @@ interface ExitCondition {
281279 * <p><b>WARNING</b>: Explicit assumptions are made with regards to {@link Consumer#accept} make
282280 * sure you have read and understood these before using this method.
283281 *
282+ * @param c the consumer
283+ * @param wait the wait strategy
284+ * @param exit the exit condition
284285 * @throws IllegalArgumentException c OR wait OR exit are {@code null}
285286 */
286287 void drain (Consumer <T > c , WaitStrategy wait , ExitCondition exit );
287288
288289 /**
289290 * Stuff the queue with elements from the supplier forever. Semantically similar to:
290291 *
291- * <p>
292- *
293292 * <pre>
294293 * <code>
295294 * int idleCounter = 0;
@@ -311,6 +310,9 @@ interface ExitCondition {
311310 * <p><b>WARNING</b>: Explicit assumptions are made with regards to {@link Supplier#get} make sure
312311 * you have read and understood these before using this method.
313312 *
313+ * @param s the supplier
314+ * @param wait the wait strategy
315+ * @param exit the exit condition
314316 * @throws IllegalArgumentException s OR wait OR exit are {@code null}
315317 */
316318 void fill (Supplier <T > s , WaitStrategy wait , ExitCondition exit );
0 commit comments