8000 small doc and naming fixes by pongad · Pull Request #1556 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,22 @@
import com.google.common.util.concurrent.ListenableFuture;
import com.google.pubsub.v1.PubsubMessage;

/** Users of the {@link Subscriber} must implement this interface to receive messages. */
/** This interface can be implemented by users of {@link Subscriber} to receive messages. */
public interface MessageReceiver {
enum AckReply {
/** To be used for acking a message. */
/** A reply to a message, to be sent back to the service. */
enum AckReply {
/**
* Acknowledges that the message has been successfully processed. The service will not send the
* message again.
*/
ACK,
/** To be used for nacking a message. */
/**
* Signals that the message has not been successfully processed. The service will resend the
* message.
*/
NACK
}

/**
* Called when a message is received by the subscriber.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@
*/
public class Publisher {
/** The maximum number of messages in one request. Defined by the API. */
public static long getApiMaxBundleMessages() {
public static long getApiMaxRequestElementCount() {
return 1000L;
}

/** The maximum size of one request. Defined by the API. */
public static long getApiMaxBundleBytes() {
public static long getApiMaxRequestBytes() {
return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
}

Expand Down Expand Up @@ -193,7 +193,7 @@ private Publisher(Builder builder) throws IOException {
messagesWaiter = new MessagesWaiter();
}

/** Topic to which the publisher publishes to. */
/** Topic which the publisher publishes to. */
public String getTopic() {
return topic;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -361,14 +361,17 @@ public SubscriberStats getStats() {
return null;
}

/** Subscription which the subscriber is subscribed to. */
public String getSubscription() {
return subscription;
}

/** Acknowledgement expiration padding. See {@link Builder.setAckExpirationPadding}. */
public Duration getAckExpirationPadding() {
return ackExpirationPadding;
}

/** The flow control settings the Subscriber is configured with. */
public FlowController.Settings getFlowControlSettings() {
return flowControlSettings;
}
Expand Down
0