diff options
Diffstat (limited to 'yolean/src/main/java/com/yahoo/yolean/concurrent/ThreadRobustList.java')
-rw-r--r-- | yolean/src/main/java/com/yahoo/yolean/concurrent/ThreadRobustList.java | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/yolean/src/main/java/com/yahoo/yolean/concurrent/ThreadRobustList.java b/yolean/src/main/java/com/yahoo/yolean/concurrent/ThreadRobustList.java index 3f57319cdce..72020bbaf88 100644 --- a/yolean/src/main/java/com/yahoo/yolean/concurrent/ThreadRobustList.java +++ b/yolean/src/main/java/com/yahoo/yolean/concurrent/ThreadRobustList.java @@ -8,15 +8,15 @@ import java.util.NoSuchElementException; /** * <p>This class implements a thread-safe, lock-free list of Objects that supports multiple readers and a single writer. * Because there are no locks or other memory barriers involved, there exists no <i>happens-before</i> relationship - * among calls to either methods of the <tt>ThreadRobustList</tt>. This means that there are no guarantees as to when + * among calls to either methods of the <code>ThreadRobustList</code>. This means that there are no guarantees as to when * (or even if) an item {@link #add(Object)}ed becomes visible through {@link #iterator()}. If visibility is required, * either use explicit synchronization between reader and writer thread, or move to a different concurrent collection - * (e.g. <tt>CopyOnWriteArrayList</tt>).</p> - * <p>Because it is lock-free, the <tt>ThreadRobustList</tt> has minimal overhead to both reading and writing. The + * (e.g. <code>CopyOnWriteArrayList</code>).</p> + * <p>Because it is lock-free, the <code>ThreadRobustList</code> has minimal overhead to both reading and writing. The * iterator offered by this class always observes the list in a consistent state, and it never throws a - * <tt>ConcurrentModificationException</tt>.</p> - * <p>The <tt>ThreadRobustList</tt> does not permit adding <tt>null</tt> items.</p> - * <p>The usage of <tt>ThreadRobustList</tt> has no memory consistency effects. </p> + * <code>ConcurrentModificationException</code>.</p> + * <p>The <code>ThreadRobustList</code> does not permit adding <code>null</code> items.</p> + * <p>The usage of <code>ThreadRobustList</code> has no memory consistency effects. </p> * * @author <a href="mailto:steinar@yahoo-inc.com">Steinar Knutsen</a> * @author bratseth @@ -28,7 +28,7 @@ public class ThreadRobustList<T> implements Iterable<T> { private int next = 0; /** - * <p>Constructs a new instance of this class with an initial capacity of <tt>10</tt>.</p> + * <p>Constructs a new instance of this class with an initial capacity of <code>10</code>.</p> */ public ThreadRobustList() { this(10); @@ -46,18 +46,18 @@ public class ThreadRobustList<T> implements Iterable<T> { /** * <p>Returns whether or not this list is empty.</p> * - * @return <tt>true</tt> if this list has zero items + * @return <code>true</code> if this list has zero items */ public boolean isEmpty() { return next == 0; } /** - * <p>Adds an item to this list. As opposed to <tt>CopyOnWriteArrayList</tt>, items added to this list may become + * <p>Adds an item to this list. As opposed to <code>CopyOnWriteArrayList</code>, items added to this list may become * visible to iterators created <em>before</em> a call to this method.</p> * * @param item the item to add - * @throws NullPointerException if <tt>item</tt> is <tt>null</tt> + * @throws NullPointerException if <code>item</code> is <code>null</code> */ public void add(T item) { if (item == null) { @@ -74,9 +74,9 @@ public class ThreadRobustList<T> implements Iterable<T> { } /** - * <p>Returns an iterator over the items in this list. As opposed to <tt>CopyOnWriteArrayList</tt>, this iterator - * may see items added to the <tt>ThreadRobustList</tt> even if they occur <em>after</em> a call to this method.</p> - * <p>The returned iterator does not support <tt>remove()</tt>.</p> + * <p>Returns an iterator over the items in this list. As opposed to <code>CopyOnWriteArrayList</code>, this iterator + * may see items added to the <code>ThreadRobustList</code> even if they occur <em>after</em> a call to this method.</p> + * <p>The returned iterator does not support <code>remove()</code>.</p> * * @return an iterator over this list */ |