From 4bbbf186b6e61fce43a4608fe5bb5b35f636db30 Mon Sep 17 00:00:00 2001 From: kimchy Date: Mon, 2 Aug 2010 09:53:08 +0300 Subject: [PATCH] fix some javadocs --- .idea/modules/elasticsearch.iml | 3 +- .../action/index/IndexRequestBuilder.java | 2 +- .../lucene/versioned/NativeVersionedMap.java | 2 +- .../common/settings/loader/package-info.java | 2 +- .../common/util/concurrent/ThreadBarrier.java | 38 +++++++------------ .../index/field/function/FieldsFunction.java | 1 - 6 files changed, 17 insertions(+), 31 deletions(-) diff --git a/.idea/modules/elasticsearch.iml b/.idea/modules/elasticsearch.iml index e8fa1fb441d..c7bce0cc90b 100644 --- a/.idea/modules/elasticsearch.iml +++ b/.idea/modules/elasticsearch.iml @@ -16,11 +16,10 @@ - + - diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/client/action/index/IndexRequestBuilder.java b/modules/elasticsearch/src/main/java/org/elasticsearch/client/action/index/IndexRequestBuilder.java index 1196d5258a8..4e5baf20892 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/client/action/index/IndexRequestBuilder.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/client/action/index/IndexRequestBuilder.java @@ -175,7 +175,7 @@ public class IndexRequestBuilder extends BaseRequestBuildertrue to force this index to use {@link IndexRequest.OpType#CREATE}. + * Set to true to force this index to use {@link org.elasticsearch.action.index.IndexRequest.OpType#CREATE}. */ public IndexRequestBuilder setCreate(boolean create) { request.create(create); diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java index 272aa6848fd..b563310aef5 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/lucene/versioned/NativeVersionedMap.java @@ -26,7 +26,7 @@ import java.util.concurrent.locks.ReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock; /** - * An implementation of {@link VersionedMap} based on trove {@link org.elasticsearch.util.gnu.trove.TIntIntHashMap}. + * An implementation of {@link VersionedMap} based on trove {@link org.elasticsearch.common.trove.TIntIntHashMap}. * * @author kimchy (Shay Banon) */ diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/settings/loader/package-info.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/settings/loader/package-info.java index 8c5636a279e..1ca121b25c0 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/settings/loader/package-info.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/settings/loader/package-info.java @@ -19,6 +19,6 @@ /** * Settings loader (parser) allowing to parse different "source" formats into - * a {@link Settings}. + * a {@link org.elasticsearch.common.settings.Settings}. */ package org.elasticsearch.common.settings.loader; \ No newline at end of file diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java b/modules/elasticsearch/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java index 02546a06947..1926d06e728 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/common/util/concurrent/ThreadBarrier.java @@ -113,7 +113,7 @@ import java.util.concurrent.TimeoutException; * } * * - * @author kimchy (Shay Banon) + * @author kimchy (shay.banon) */ public class ThreadBarrier extends CyclicBarrier { /** @@ -122,23 +122,14 @@ public class ThreadBarrier extends CyclicBarrier { */ private Throwable cause; - /** - * {@inheritDoc} - */ public ThreadBarrier(int parties) { super(parties); } - /** - * {@inheritDoc} - */ public ThreadBarrier(int parties, Runnable barrierAction) { super(parties, barrierAction); } - /** - * {@inheritDoc} - */ @Override public int await() throws InterruptedException, BrokenBarrierException { try { @@ -150,9 +141,6 @@ public class ThreadBarrier extends CyclicBarrier { } } - /** - * {@inheritDoc} - */ @Override public int await(long timeout, TimeUnit unit) throws InterruptedException, BrokenBarrierException, TimeoutException { try { breakIfBroken(); @@ -258,18 +246,18 @@ public class ThreadBarrier extends CyclicBarrier { *

* Usage example:
*


-     *                                                                         BarrierTimer timer = new BarrierTimer();
-     *                                                                         ThreadBarrier barrier = new ThreadBarrier( nTHREADS + 1, timer );
-     *                                                                         ..
-     *                                                                         barrier.await(); // starts timer when all threads trip on await
-     *                                                                         barrier.await(); // stops  timer when all threads trip on await
-     *                                                                         ..
-     *                                                                         long time = timer.getTimeInNanos();
-     *                                                                         long tpi = time / ((long)nREPEATS * nTHREADS); //throughput per thread iteration
-     *                                                                         long secs = timer.getTimeInSeconds();	//total runtime in seconds
-     *                                                                         ..
-     *                                                                         timer.reset();  // reuse timer
-     *                                                                       
+ * BarrierTimer timer = new BarrierTimer(); + * ThreadBarrier barrier = new ThreadBarrier( nTHREADS + 1, timer ); + * .. + * barrier.await(); // starts timer when all threads trip on await + * barrier.await(); // stops timer when all threads trip on await + * .. + * long time = timer.getTimeInNanos(); + * long tpi = time / ((long)nREPEATS * nTHREADS); //throughput per thread iteration + * long secs = timer.getTimeInSeconds(); //total runtime in seconds + * .. + * timer.reset(); // reuse timer + * */ public static class BarrierTimer implements Runnable { volatile boolean started; diff --git a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/function/FieldsFunction.java b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/function/FieldsFunction.java index 1d9f45a49ff..9f051170d30 100644 --- a/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/function/FieldsFunction.java +++ b/modules/elasticsearch/src/main/java/org/elasticsearch/index/field/function/FieldsFunction.java @@ -33,7 +33,6 @@ public interface FieldsFunction { /** * @param docId * @param vars The vars providing additional parameters, should be reused and has values added to it in execute - * @return */ Object execute(int docId, Map vars); }