Skip to content

Commit 9d86364

Browse files
committed
Fixing javadocs
1 parent 2912443 commit 9d86364

File tree

5 files changed

+30
-28
lines changed

5 files changed

+30
-28
lines changed

src/main/java/com/yahoo/bullet/pubsub/PubSub.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public enum Context {
3030
/**
3131
* Instantiate a PubSub using parameters from {@link PubSubConfig}.
3232
*
33-
* @param config the {@link PubSubConfig} containing all required PubSub parameters.
33+
* @param config The {@link PubSubConfig} containing all required PubSub parameters.
3434
*/
3535
public PubSub(PubSubConfig config) {
3636
context = Context.valueOf(config.get(PubSubConfig.CONTEXT_NAME).toString());
@@ -49,15 +49,15 @@ public PubSub(PubSubConfig config) {
4949
* (See {@link PubSub#context}) split as evenly as possible among them.
5050
*
5151
* @param n The number of Publishers requested.
52-
* @return List of n Publishers wired as required.
52+
* @return The {@link List} of n Publishers wired as required.
5353
*/
5454
public abstract List<Publisher> getPublishers(int n);
5555

5656
/**
5757
* Get a {@link Subscriber} instance wired to read from all allocated partitions in the appropriate queue (See
5858
* {@link PubSub#context}).
5959
*
60-
* @return {@link Subscriber} wired as required.
60+
* @return The {@link Subscriber} wired as required.
6161
*/
6262
public abstract Subscriber getSubscriber();
6363

@@ -66,13 +66,14 @@ public PubSub(PubSubConfig config) {
6666
* (See {@link PubSub#context}) split as evenly as possible among them.
6767
*
6868
* @param n The number of Subscribers requested.
69-
* @return List of n Subscribers wired as required.
69+
* @return The {@link List} of n Subscribers wired as required.
7070
*/
7171
public abstract List<Subscriber> getSubscribers(int n);
7272

7373
/**
7474
* Create a PubSub instance using the class specified in the config file.
75-
* @param config {@link PubSubConfig} containing the class name and PubSub settings.
75+
*
76+
* @param config The {@link PubSubConfig} containing the class name and PubSub settings.
7677
* @return an instance of specified class initialized with settings from the input file and defaults.
7778
* @throws PubSubException if PubSub creation fails.
7879
*/

src/main/java/com/yahoo/bullet/pubsub/PubSubException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public class PubSubException extends Exception {
44
/**
55
* Exception to be thrown if there is an error in {@link PubSub}, {@link Publisher} or {@link Subscriber}.
66
*
7-
* @param message error message to be associated with the PubSubException.
7+
* @param message The error message to be associated with the PubSubException.
88
*/
99
public PubSubException(String message) {
1010
super(message);

src/main/java/com/yahoo/bullet/pubsub/PubSubMessage.java

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ public class PubSubMessage implements Serializable {
1919
/**
2020
* Constructor for a message having only content.
2121
*
22-
* @param id is the ID associated with the message.
23-
* @param content is the content of the message.
22+
* @param id The ID associated with the message.
23+
* @param content The content of the message.
2424
*/
2525
public PubSubMessage(String id, String content) {
2626
this(id, content, -1, new Metadata());
@@ -29,9 +29,9 @@ public PubSubMessage(String id, String content) {
2929
/**
3030
* Constructor for a message having content and a sequence number.
3131
*
32-
* @param id is the ID associated with the message.
33-
* @param content is the content of the message.
34-
* @param sequence is the sequence number of the message.
32+
* @param id The ID associated with the message.
33+
* @param content The content of the message.
34+
* @param sequence The sequence number of the message.
3535
*/
3636
public PubSubMessage(String id, String content, int sequence) {
3737
this(id, content, sequence, new Metadata());
@@ -40,9 +40,9 @@ public PubSubMessage(String id, String content, int sequence) {
4040
/**
4141
* Constructor for a PubSubMessage having content and Metadata.
4242
*
43-
* @param id is the ID associated with the message.
44-
* @param content is the content of the message.
45-
* @param metadata is the {@link Metadata} associated with the message.
43+
* @param id The ID associated with the message.
44+
* @param content The content of the message.
45+
* @param metadata The {@link Metadata} associated with the message.
4646
*/
4747
public PubSubMessage(String id, String content, Metadata metadata) {
4848
this(id, content, -1, metadata);
@@ -51,10 +51,10 @@ public PubSubMessage(String id, String content, Metadata metadata) {
5151
/**
5252
* Constructor for a message having content, a {@link Metadata.Signal} and a sequence number.
5353
*
54-
* @param id is the ID associated with the message.
55-
* @param content is the content of the message.
56-
* @param sequence is the sequence number of the message.
57-
* @param signal is the Metadata.Signal of the message.
54+
* @param id The ID associated with the message.
55+
* @param content The content of the message.
56+
* @param sequence The sequence number of the message.
57+
* @param signal The Metadata.Signal of the message.
5858
*/
5959
public PubSubMessage(String id, String content, int sequence, Signal signal) {
6060
this(id, content, sequence, new Metadata(signal, null));
@@ -63,10 +63,10 @@ public PubSubMessage(String id, String content, int sequence, Signal signal) {
6363
/**
6464
* Constructor for a PubSubMessage having content, Metadata and a sequence number.
6565
*
66-
* @param id is the ID associated with the message.
67-
* @param content is the content of the message.
68-
* @param sequence is the sequence number associated with the message.
69-
* @param metadata is the {@link Metadata} associated with the message.
66+
* @param id The ID associated with the message.
67+
* @param content The content of the message.
68+
* @param sequence The sequence number associated with the message.
69+
* @param metadata The {@link Metadata} associated with the message.
7070
*/
7171
public PubSubMessage(String id, String content, int sequence, Metadata metadata) {
7272
this.id = id;

src/main/java/com/yahoo/bullet/pubsub/Publisher.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ public interface Publisher {
44
/**
55
* Sends a {@link PubSubMessage}. Messages with the same ID should be received in order.
66
*
7-
* @param message the {@link PubSubMessage} to be sent.
7+
* @param message The {@link PubSubMessage} to be sent.
88
* @throws PubSubException if the messaging system throws an error.
99
*/
1010
void send(PubSubMessage message) throws PubSubException;

src/main/java/com/yahoo/bullet/pubsub/Subscriber.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ public interface Subscriber {
2222
* 1. Ack all received messages.
2323
* 2. Commit current read offset to persistent/fault tolerant storage.
2424
*
25-
* @param id the ID of the message to be marked as committed.
26-
* @param sequence the sequence number of the message to be committed.
25+
* @param id The ID of the message to be marked as committed.
26+
* @param sequence The sequence number of the message to be committed.
2727
*/
2828
void commit(String id, int sequence);
2929

3030
/**
3131
* Convenience method to commit a message that doesn't contain a sequence number.
3232
*
33-
* @param id is the ID of the message to be marked as committed.
33+
* @param id The ID of the message to be marked as committed.
3434
*/
3535
default void commit(String id) {
3636
commit(id, -1);
@@ -39,14 +39,15 @@ default void commit(String id) {
3939
/**
4040
* Marks the processing of the {@link PubSubMessage} with the given id as failed.
4141
*
42-
* @param id the ID of the PubSubMessage to mark as a processing failure.
42+
* @param id The ID of the PubSubMessage to mark as a processing failure.
43+
* @param sequence The sequence number of the PubSubMessage to mark as a processing failure.
4344
*/
4445
void fail(String id, int sequence);
4546

4647
/**
4748
* Convenience method to fail a message that doesn't contain a sequence number.
4849
*
49-
* @param id is the ID of the message to be marked as a processing failure.
50+
* @param id The ID of the message to be marked as a processing failure.
5051
*/
5152
default void fail(String id) {
5253
fail(id, -1);

0 commit comments

Comments
 (0)