From 0eef9edf1a6e7561b9e8b644f00a2dbee9891b5f Mon Sep 17 00:00:00 2001 From: Jonathan Ellis Date: Tue, 31 Mar 2009 13:25:05 +0000 Subject: [PATCH] apply patch from johano fixing #31 git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@760437 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/cassandra/concurrent/IStage.java | 22 +++++++++---------- .../cassandra/concurrent/StageManager.java | 4 ++-- .../apache/cassandra/db/CalloutManager.java | 2 +- .../cassandra/db/ICompactSerializer2.java | 2 -- src/org/apache/cassandra/db/Memtable.java | 5 +++-- src/org/apache/cassandra/db/PrimaryKey.java | 3 ++- src/org/apache/cassandra/io/IFileReader.java | 12 +++++----- src/org/apache/cassandra/io/SequenceFile.java | 14 ++++++------ .../apache/cassandra/net/IAsyncCallback.java | 2 +- .../apache/cassandra/net/IAsyncResult.java | 2 -- .../cassandra/net/IMessagingService.java | 2 +- .../apache/cassandra/net/SelectorManager.java | 3 +-- 12 files changed, 35 insertions(+), 38 deletions(-) diff --git a/src/org/apache/cassandra/concurrent/IStage.java b/src/org/apache/cassandra/concurrent/IStage.java index b041ae4bf6..1ed9fc0625 100644 --- a/src/org/apache/cassandra/concurrent/IStage.java +++ b/src/org/apache/cassandra/concurrent/IStage.java @@ -31,8 +31,8 @@ import java.util.concurrent.*; public interface IStage { /** - * Get the name of the associated stage - * @return + * Get the name of the associated stage. + * @return name of the associated stage. */ public String getName(); @@ -43,7 +43,7 @@ public interface IStage public ExecutorService getInternalThreadPool(); /** - * This method is used to execute a peice of code on + * This method is used to execute a piece of code on * this stage. The idea is that the run() method * of this Runnable instance is invoked on a thread from a * thread pool that belongs to this stage. @@ -52,14 +52,14 @@ public interface IStage public void execute(Runnable runnable); /** - * This method is used to execute a peice of code on + * This method is used to execute a piece of code on * this stage which returns a Future pointer. The idea * is that the call() method of this Runnable * instance is invoked on a thread from a thread pool * that belongs to this stage. * @param callable instance that needs to be invoked. - * @return + * @return the future return object from the callable. */ public Future execute(Callable callable); @@ -68,9 +68,9 @@ public interface IStage * that execute periodically. * * @param command the task to execute. - * @param initialDelay the time to delay first execution + * @param delay the time to delay first execution * @param unit the time unit of the initialDelay and period parameters - * @return + * @return the future return object from the runnable. */ public ScheduledFuture schedule(Runnable command, long delay, TimeUnit unit); @@ -81,7 +81,7 @@ public interface IStage * @param initialDelay the time to delay first execution * @param period the period between successive executions * @param unit the time unit of the initialDelay and period parameters - * @return + * @return the future return object from the runnable. */ public ScheduledFuture scheduleAtFixedRate(Runnable command, long initialDelay, long period, TimeUnit unit); @@ -92,7 +92,7 @@ public interface IStage * @param initialDelay the time to delay first execution * @param delay the delay between the termination of one execution and the commencement of the next. * @param unit the time unit of the initialDelay and delay parameters - * @return + * @return the future return object from the runnable. */ public ScheduledFuture scheduleWithFixedDelay(Runnable command, long initialDelay, long delay, TimeUnit unit); @@ -107,14 +107,14 @@ public interface IStage /** * Checks if the stage has been shutdown. - * @return + * @return true if shut down, otherwise false. */ public boolean isShutdown(); /** * This method returns the number of tasks that are * pending on this stage to be executed. - * @return + * @return task count. */ public long getTaskCount(); } diff --git a/src/org/apache/cassandra/concurrent/StageManager.java b/src/org/apache/cassandra/concurrent/StageManager.java index aa3fa60f79..c3fc2840d1 100644 --- a/src/org/apache/cassandra/concurrent/StageManager.java +++ b/src/org/apache/cassandra/concurrent/StageManager.java @@ -52,7 +52,7 @@ public class StageManager * Returns the stage that we are currently executing on. * This relies on the fact that the thread names in the * stage have the name of the stage as the prefix. - * @return + * @return Returns the stage that we are currently executing on. */ public static IStage getCurrentStage() { @@ -97,7 +97,7 @@ public class StageManager * This method gets the number of tasks on the * stage's internal queue. * @param stage name of the stage - * @return + * @return stage task count. */ public static long getStageTaskCount(String stage) { diff --git a/src/org/apache/cassandra/db/CalloutManager.java b/src/org/apache/cassandra/db/CalloutManager.java index 99f378b174..acca1ac78c 100644 --- a/src/org/apache/cassandra/db/CalloutManager.java +++ b/src/org/apache/cassandra/db/CalloutManager.java @@ -187,7 +187,7 @@ public class CalloutManager /** * Execute the specified callout. * @param callout to be executed. - * @params args arguments to be passed to the callouts. + * @param args arguments to be passed to the callouts. */ public Object executeCallout(String callout, Object ... args) { diff --git a/src/org/apache/cassandra/db/ICompactSerializer2.java b/src/org/apache/cassandra/db/ICompactSerializer2.java index 46a195f885..de57a50cf3 100644 --- a/src/org/apache/cassandra/db/ICompactSerializer2.java +++ b/src/org/apache/cassandra/db/ICompactSerializer2.java @@ -40,7 +40,6 @@ public interface ICompactSerializer2 extends ICompactSerializer * argument. * * @param dis DataInput from which we need to deserialize. - * @param columnNames list of items that are required. * @throws IOException * @return type which contains the specified items. */ @@ -52,7 +51,6 @@ public interface ICompactSerializer2 extends ICompactSerializer * * @param dis DataInput from which we need to deserialize. * @param name name of the desired field. - * @param count count of the number of fields required. * @throws IOException * @return the deserialized type. */ diff --git a/src/org/apache/cassandra/db/Memtable.java b/src/org/apache/cassandra/db/Memtable.java index 9c68f398d6..9e6dd382ef 100644 --- a/src/org/apache/cassandra/db/Memtable.java +++ b/src/org/apache/cassandra/db/Memtable.java @@ -166,8 +166,9 @@ public class Memtable implements MemtableMBean, Comparable /** * Compares two Memtable based on creation time. - * @param rhs - * @return + * @param rhs Memtable to compare to. + * @return a negative integer, zero, or a positive integer as this object + * is less than, equal to, or greater than the specified object. */ public int compareTo(Memtable rhs) { diff --git a/src/org/apache/cassandra/db/PrimaryKey.java b/src/org/apache/cassandra/db/PrimaryKey.java index 694d2d6007..b01535a428 100644 --- a/src/org/apache/cassandra/db/PrimaryKey.java +++ b/src/org/apache/cassandra/db/PrimaryKey.java @@ -93,7 +93,8 @@ public class PrimaryKey implements Comparable * is an OPHF then the key is used. * * @param rhs primary against which we wish to compare. - * @return + * @return a negative integer, zero, or a positive integer as this object + * is less than, equal to, or greater than the specified object. */ public int compareTo(PrimaryKey rhs) { diff --git a/src/org/apache/cassandra/io/IFileReader.java b/src/org/apache/cassandra/io/IFileReader.java index 966ce13970..480cd435b2 100644 --- a/src/org/apache/cassandra/io/IFileReader.java +++ b/src/org/apache/cassandra/io/IFileReader.java @@ -84,7 +84,7 @@ public interface IFileReader * This method dumps the next key/value into the DataOuputStream * passed in. * - * @param dos - DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @return number of bytes read. * @throws IOException */ @@ -95,7 +95,7 @@ public interface IFileReader * passed in. * * @param key key we are interested in. - * @param dos DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @param section region of the file that needs to be read * @throws IOException * @return the number of bytes read. @@ -107,7 +107,7 @@ public interface IFileReader * passed in. * * @param key key we are interested in. - * @param dos DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @param column name of the column in our format. * @param section region of the file that needs to be read * @throws IOException @@ -121,8 +121,8 @@ public interface IFileReader * specific data as it will have indexes. * * @param key - key we are interested in. - * @param dos - DataOutputStream that needs to be filled. - * @param cfName - The name of the column family only without the ":" + * @param bufOut - DataOutputStream that needs to be filled. + * @param columnFamilyName The name of the column family only without the ":" * @param columnNames - The list of columns in the cfName column family * that we want to return * @param section region of the file that needs to be read @@ -137,7 +137,7 @@ public interface IFileReader * passed in. * * @param key key we are interested in. - * @param dos DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @param column name of the column in our format. * @param timeRange time range we are interested in. * @param section region of the file that needs to be read diff --git a/src/org/apache/cassandra/io/SequenceFile.java b/src/org/apache/cassandra/io/SequenceFile.java index 61728857a3..8ba198fdcd 100644 --- a/src/org/apache/cassandra/io/SequenceFile.java +++ b/src/org/apache/cassandra/io/SequenceFile.java @@ -848,7 +848,7 @@ public class SequenceFile * specific data as it will have indexes. * * @param key key we are interested in. - * @param dos DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @param cf the IColumn we want to read * @param section region of the file that needs to be read * @return total number of bytes read/considered @@ -975,8 +975,8 @@ public class SequenceFile * specific data as it will have indexes. * @param key key we are interested in. - * @param dos DataOutputStream that needs to be filled. - * @param column name of the column in our format. + * @param bufOut DataOutputStream that needs to be filled. + * @param cf name of the column in our format. * @param timeRange time range we are interested in. * @param section region of the file that needs to be read * @throws IOException @@ -1087,8 +1087,8 @@ public class SequenceFile * specific data as it will have indexes. * * @param key key we are interested in. - * @param dos DataOutputStream that needs to be filled. - * @param cfName The name of the column family only without the ":" + * @param bufOut DataOutputStream that needs to be filled. + * @param cf The name of the column family only without the ":" * @param columnNames The list of columns in the cfName column family that we want to return * @param section region of the file that needs to be read * @return total number of bytes read/considered @@ -1235,7 +1235,7 @@ public class SequenceFile * This method dumps the next key/value into the DataOuputStream * passed in. * - * @param dos - DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @return total number of bytes read/considered */ public long next(DataOutputBuffer bufOut) throws IOException @@ -1276,7 +1276,7 @@ public class SequenceFile * passed in. * * @param key - key we are interested in. - * @param dos - DataOutputStream that needs to be filled. + * @param bufOut DataOutputStream that needs to be filled. * @param section region of the file that needs to be read * @return total number of bytes read/considered */ diff --git a/src/org/apache/cassandra/net/IAsyncCallback.java b/src/org/apache/cassandra/net/IAsyncCallback.java index aadde58729..5e7b9a961c 100644 --- a/src/org/apache/cassandra/net/IAsyncCallback.java +++ b/src/org/apache/cassandra/net/IAsyncCallback.java @@ -25,7 +25,7 @@ package org.apache.cassandra.net; public interface IAsyncCallback { /** - * @param response responses to be returned + * @param msg responses to be returned */ public void response(Message msg); diff --git a/src/org/apache/cassandra/net/IAsyncResult.java b/src/org/apache/cassandra/net/IAsyncResult.java index 3959c49ab1..2fdda9a7a1 100644 --- a/src/org/apache/cassandra/net/IAsyncResult.java +++ b/src/org/apache/cassandra/net/IAsyncResult.java @@ -67,8 +67,6 @@ public interface IAsyncResult /** * Store the result obtained for the submitted task. - * @param result result wrapped in an Object[] - * * @param result the response message */ public void result(Message result); diff --git a/src/org/apache/cassandra/net/IMessagingService.java b/src/org/apache/cassandra/net/IMessagingService.java index dcc4eeede7..29be3fe9e7 100644 --- a/src/org/apache/cassandra/net/IMessagingService.java +++ b/src/org/apache/cassandra/net/IMessagingService.java @@ -137,7 +137,7 @@ public interface IMessagingService * whose results are harnessed via the IAsyncResult * @param messages groups of grouped messages. * @param to destination for the groups of messages - * @param the callback handler to be invoked for the responses + * @param cb the callback handler to be invoked for the responses * @return the group id which is basically useless - it is only returned for API's * to look compatible. */ diff --git a/src/org/apache/cassandra/net/SelectorManager.java b/src/org/apache/cassandra/net/SelectorManager.java index 618c41f6f8..3569b1f663 100644 --- a/src/org/apache/cassandra/net/SelectorManager.java +++ b/src/org/apache/cassandra/net/SelectorManager.java @@ -58,8 +58,7 @@ public class SelectorManager extends Thread /** * Constructor, which is private since there is only one selector per JVM. * - * @param profile - * DESCRIBE THE PARAMETER + * @param name name of thread. */ protected SelectorManager(String name) {