Skip to content

Commit

Permalink
Clean up javadoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
nitsanw committed Aug 21, 2017
1 parent 9880309 commit 72ad973
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 40 deletions.
Expand Up @@ -16,7 +16,7 @@

/**
* A simple implementation of {@link java.util.Map.Entry}.
* Does not implement {@link java.util.Map.Entry.setValue}, that is done by users of the class.
* Does not implement {@link java.util.Map.Entry#setValue}, that is done by users of the class.
*
* @since 1.5
* @author Cliff Click
Expand Down
Expand Up @@ -635,10 +635,8 @@ public int drain(Consumer<E> c)
@Override
public int drain(final Consumer<E> c, final int limit)
{
/**
* Impl note: there are potentially some small gains to be had by manually inlining relaxedPoll() and hoisting
* reused fields out to reduce redundant reads.
*/
// Impl note: there are potentially some small gains to be had by manually inlining relaxedPoll() and hoisting
// reused fields out to reduce redundant reads.
int i = 0;
E m;
for (; i < limit && (m = relaxedPoll()) != null; i++)
Expand Down
Expand Up @@ -16,7 +16,7 @@ public static <E> E[] allocate(int capacity)

/**
* @param index desirable element index
* @param mask
* @param mask (length - 1)
* @return the offset in bytes within the array for a given index.
*/
public static long calcElementOffset(long index, long mask)
Expand Down
Expand Up @@ -47,7 +47,7 @@ public ConcurrentCircularArrayQueue(int capacity)

/**
* @param index desirable element index
* @param mask
* @param mask (length - 1)
* @return the offset in bytes within the array for a given index.
*/
protected static long calcElementOffset(long index, long mask)
Expand Down
Expand Up @@ -9,12 +9,6 @@ private LinkedArrayQueueUtil()
{
}

/**
* Determines the length of the buffer
*
* @param buf
* @return
*/
static int length(Object[] buf)
{
return buf.length;
Expand Down
Expand Up @@ -128,8 +128,8 @@ public MpmcArrayQueueL3Pad(int capacity)
}

/**
* A Multi-Producer-Multi-Consumer queue based on a {@link ConcurrentCircularArrayQueue}. This implies that
* any and all threads may call the offer/poll/peek methods and correctness is maintained. <br>
* A Multi-Producer-Multi-Consumer queue based on a {@link org.jctools.queues.ConcurrentCircularArrayQueue}. This
* implies that any and all threads may call the offer/poll/peek methods and correctness is maintained. <br>
* This implementation follows patterns documented on the package level for False Sharing protection.<br>
* The algorithm for offer/poll is an adaptation of the one put forward by D. Vyukov (See <a
* href="http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue">here</a>). The original
Expand Down
Expand Up @@ -180,8 +180,8 @@ public MpscArrayQueueL3Pad(int capacity)
}

/**
* A Multi-Producer-Single-Consumer queue based on a {@link ConcurrentCircularArrayQueue}. This implies that
* any thread may call the offer method, but only a single thread may call poll/peek for correctness to
* A Multi-Producer-Single-Consumer queue based on a {@link org.jctools.queues.ConcurrentCircularArrayQueue}. This
* implies that any thread may call the offer method, but only a single thread may call poll/peek for correctness to
* maintained. <br>
* This implementation follows patterns documented on the package level for False Sharing protection.<br>
* This implementation is using the <a href="http://sourceforge.net/projects/mc-fastflow/">Fast Flow</a>
Expand All @@ -200,7 +200,7 @@ public MpscArrayQueue(final int capacity)
}

/**
* {@link MpscArrayQueue#offer(E)}} if {@link MpscArrayQueue#size()} is less than threshold.
* {@link #offer}} if {@link #size()} is less than threshold.
*
* @param e the object to offer onto the queue, not null
* @param threshold the maximum allowable size
Expand Down Expand Up @@ -260,8 +260,8 @@ public boolean offerIfBelowThreshold(final E e, int threshold)
* Lock free offer using a single CAS. As class name suggests access is permitted to many threads
* concurrently.
*
* @see java.util.Queue#offer(java.lang.Object)
* @see MessagePassingQueue#offer(Object)
* @see java.util.Queue#offer
* @see org.jctools.queues.MessagePassingQueue#offer
*/
@Override
public boolean offer(final E e)
Expand Down Expand Up @@ -356,8 +356,8 @@ public final int failFastOffer(final E e)
* IMPLEMENTATION NOTES:<br>
* Lock free poll using ordered loads/stores. As class name suggests access is limited to a single thread.
*
* @see java.util.Queue#poll()
* @see MessagePassingQueue#poll()
* @see java.util.Queue#poll
* @see org.jctools.queues.MessagePassingQueue#poll
*/
@Override
public E poll()
Expand Down Expand Up @@ -401,8 +401,8 @@ public E poll()
* IMPLEMENTATION NOTES:<br>
* Lock free peek using ordered loads. As class name suggests access is limited to a single thread.
*
* @see java.util.Queue#poll()
* @see MessagePassingQueue#poll()
* @see java.util.Queue#poll
* @see org.jctools.queues.MessagePassingQueue#poll
*/
@Override
public E peek()
Expand Down
Expand Up @@ -27,7 +27,7 @@ public static <E> E[] allocate(int capacity)

/**
* @param index desirable element index
* @param mask
* @param mask (length - 1)
* @return the offset in bytes within the array for a given index.
*/
protected static long calcElementOffset(long index, long mask)
Expand Down
Expand Up @@ -534,10 +534,8 @@ public int drain(Consumer<E> c) {

@Override
public int drain(final Consumer<E> c, final int limit) {
/**
* Impl note: there are potentially some small gains to be had by manually inlining relaxedPoll() and hoisting
* reused fields out to reduce redundant reads.
*/
// Impl note: there are potentially some small gains to be had by manually inlining relaxedPoll() and hoisting
// reused fields out to reduce redundant reads.
int i = 0;
E m;
for (; i < limit && (m = relaxedPoll()) != null; i++) {
Expand Down
Expand Up @@ -116,8 +116,8 @@ public MpmcAtomicArrayQueueL3Pad(int capacity) {
* NOTE: This class was automatically generated by org.jctools.queues.atomic.JavaParsingAtomicArrayQueueGenerator
* which can found in the jctools-build module. The original source file is MpmcArrayQueue.java.
* A Multi-Producer-Multi-Consumer queue based on a {@link ConcurrentCircularArrayQueue}. This implies that
* any and all threads may call the offer/poll/peek methods and correctness is maintained. <br>
* A Multi-Producer-Multi-Consumer queue based on a {@link org.jctools.queues.ConcurrentCircularArrayQueue}. This
* implies that any and all threads may call the offer/poll/peek methods and correctness is maintained. <br>
* This implementation follows patterns documented on the package level for False Sharing protection.<br>
* The algorithm for offer/poll is an adaptation of the one put forward by D. Vyukov (See <a
* href="http://www.1024cores.net/home/lock-free-algorithms/queues/bounded-mpmc-queue">here</a>). The original
Expand Down
Expand Up @@ -159,8 +159,8 @@ public MpscAtomicArrayQueueL3Pad(int capacity) {
* NOTE: This class was automatically generated by org.jctools.queues.atomic.JavaParsingAtomicArrayQueueGenerator
* which can found in the jctools-build module. The original source file is MpscArrayQueue.java.
* A Multi-Producer-Single-Consumer queue based on a {@link ConcurrentCircularArrayQueue}. This implies that
* any thread may call the offer method, but only a single thread may call poll/peek for correctness to
* A Multi-Producer-Single-Consumer queue based on a {@link org.jctools.queues.ConcurrentCircularArrayQueue}. This
* implies that any thread may call the offer method, but only a single thread may call poll/peek for correctness to
* maintained. <br>
* This implementation follows patterns documented on the package level for False Sharing protection.<br>
* This implementation is using the <a href="http://sourceforge.net/projects/mc-fastflow/">Fast Flow</a>
Expand All @@ -177,7 +177,7 @@ public MpscAtomicArrayQueue(final int capacity) {
}

/**
* {@link MpscArrayQueue#offer(E)}} if {@link MpscArrayQueue#size()} is less than threshold.
* {@link #offer}} if {@link #size()} is less than threshold.
*
* @param e the object to offer onto the queue, not null
* @param threshold the maximum allowable size
Expand Down Expand Up @@ -232,8 +232,8 @@ public boolean offerIfBelowThreshold(final E e, int threshold) {
* Lock free offer using a single CAS. As class name suggests access is permitted to many threads
* concurrently.
*
* @see java.util.Queue#offer(java.lang.Object)
* @see MessagePassingQueue#offer(Object)
* @see java.util.Queue#offer
* @see org.jctools.queues.MessagePassingQueue#offer
*/
@Override
public boolean offer(final E e) {
Expand Down Expand Up @@ -321,8 +321,8 @@ public final int failFastOffer(final E e) {
* IMPLEMENTATION NOTES:<br>
* Lock free poll using ordered loads/stores. As class name suggests access is limited to a single thread.
*
* @see java.util.Queue#poll()
* @see MessagePassingQueue#poll()
* @see java.util.Queue#poll
* @see org.jctools.queues.MessagePassingQueue#poll
*/
@Override
public E poll() {
Expand Down Expand Up @@ -359,8 +359,8 @@ public E poll() {
* IMPLEMENTATION NOTES:<br>
* Lock free peek using ordered loads. As class name suggests access is limited to a single thread.
*
* @see java.util.Queue#poll()
* @see MessagePassingQueue#poll()
* @see java.util.Queue#poll
* @see org.jctools.queues.MessagePassingQueue#poll
*/
@Override
public E peek() {
Expand Down

0 comments on commit 72ad973

Please sign in to comment.