Skip to content
Open
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 @@ -37,7 +37,7 @@ public interface DatastoreBatchWriter extends DatastoreWriter {

/**
* Datastore add operation. This method will also allocate id for any entity with an incomplete
* key. As opposed to {@link #add(FullEntity)} and {@link #add(FullEntity...)}, this method will
* key. As opposed to {@link #add(FullEntity)} and {@link #add(FullEntity[])}, this method will
* defer any necessary id allocation to submit time.
*
* @throws IllegalArgumentException if any of the given entities is missing a key
Expand Down Expand Up @@ -88,7 +88,7 @@ public interface DatastoreBatchWriter extends DatastoreWriter {

/**
* Datastore put operation. This method will also allocate id for any entity with an incomplete
* key. As opposed to {@link #put(FullEntity)} and {@link #put(FullEntity...)}, this method will
* key. As opposed to {@link #put(FullEntity)} and {@link #put(FullEntity[])}, this method will
* defer any necessary id allocation to submit time.
*
* @throws IllegalArgumentException if any of the given entities is missing a key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface DatastoreReader {

/**
* Returns a list with a value for each given key (ordered by input). {@code null} values are
* returned for nonexistent keys. When possible prefer using {@link #get(Key...)} to avoid eagerly
* returned for nonexistent keys. When possible prefer using {@link #get(Key[])} to avoid eagerly
* loading the results.
*/
List<Entity> fetch(Key... keys);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ interface Response {

/**
* Datastore add operation. This method will also allocate id for any entity with an incomplete
* key. As opposed to {@link #add(FullEntity)} and {@link #add(FullEntity...)}, this method will
* key. As opposed to {@link #add(FullEntity)} and {@link #add(FullEntity[])}, this method will
* defer any necessary id allocation to commit time.
*
* <p>Example of adding multiple entities with deferred id allocation.
Expand Down Expand Up @@ -312,7 +312,7 @@ interface Response {

/**
* Datastore put operation. This method will also allocate id for any entity with an incomplete
* key. As opposed to {@link #put(FullEntity)} and {@link #put(FullEntity...)}, this method will
* key. As opposed to {@link #put(FullEntity)} and {@link #put(FullEntity[])}, this method will
* defer any necessary id allocation to commit time.
*
* <p>Example of putting multiple entities with deferred id allocation.
Expand Down
39 changes: 19 additions & 20 deletions java-dns/src/main/java/com/google/cloud/dns/DnsBatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ public DnsBatchResult<Page<Zone>> listZones(Dns.ZoneListOption... options) {

/**
* Adds a request representing the "create zone" operation to this batch. The {@code options} can
* be used to restrict the fields returned in the same way as for {@link Dns#create(ZoneInfo,
* Dns.ZoneOption...)}. Calling {@link DnsBatchResult#get()} on the return value yields the
* created {@link Zone} if successful and throws a {@link DnsException} otherwise.
* be used to restrict the fields returned as for {@link Dns#create(ZoneInfo, Dns.ZoneOption[])}.
* Calling {@link DnsBatchResult#get()} on the return value yields the created {@link Zone} if
* successful and throws a {@link DnsException} otherwise.
*/
public DnsBatchResult<Zone> createZone(ZoneInfo zone, Dns.ZoneOption... options) {
DnsBatchResult<Zone> result = new DnsBatchResult<>();
Expand All @@ -108,10 +108,10 @@ public DnsBatchResult<Boolean> deleteZone(String zoneName) {

/**
* Adds a request representing the "get zone" operation to this batch. The {@code options} can be
* used to restrict the fields returned in the same way as for {@link Dns#getZone(String,
* Dns.ZoneOption...)}. Calling {@link DnsBatchResult#get()} on the return value yields the
* requested {@link Zone} if successful, {@code null} if no such zone exists, or throws a {@link
* DnsException} if the operation failed.
* used to restrict the fields returned as for {@link Dns#getZone(String, Dns.ZoneOption[])}.
* Calling {@link DnsBatchResult#get()} on the return value yields the requested {@link Zone} if
* successful, {@code null} if no such zone exists, or throws a {@link DnsException} if the
* operation failed.
*/
public DnsBatchResult<Zone> getZone(String zoneName, Dns.ZoneOption... options) {
DnsBatchResult<Zone> result = new DnsBatchResult<>();
Expand Down Expand Up @@ -139,10 +139,10 @@ public DnsBatchResult<ProjectInfo> getProject(Dns.ProjectOption... options) {
/**
* Adds a request representing the "list record sets" operation in the zone specified by {@code
* zoneName} to this batch. The {@code options} can be used to restrict the fields returned or
* provide page size limits in the same way as for {@link Dns#listRecordSets(String,
* Dns.RecordSetListOption...)}. Calling {@link DnsBatchResult#get()} on the return value yields a
* page of record sets if successful and throws a {@link DnsException} if the operation failed or
* the zone does not exist.
* provide page size limits as in {@link Dns#listRecordSets(String, Dns.RecordSetListOption[])}.
* Calling {@link DnsBatchResult#get()} on the return value yields a page of record sets if
* successful and throws a {@link DnsException} if the operation failed or the zone does not
* exist.
*/
public DnsBatchResult<Page<RecordSet>> listRecordSets(
String zoneName, Dns.RecordSetListOption... options) {
Expand All @@ -157,10 +157,10 @@ public DnsBatchResult<Page<RecordSet>> listRecordSets(
/**
* Adds a request representing the "list change requests" operation in the zone specified by
* {@code zoneName} to this batch. The {@code options} can be used to restrict the fields returned
* or provide page size limits in the same way as for {@link Dns#listChangeRequests(String,
* Dns.ChangeRequestListOption...)}. Calling {@link DnsBatchResult#get()} on the return value
* yields a page of change requests if successful and throws a {@link DnsException} if the
* operation failed or the zone does not exist.
* or limit page size as in {@link Dns#listChangeRequests(String, Dns.ChangeRequestListOption[])}.
* Calling {@link DnsBatchResult#get()} on the return value yields a page of change requests if
* successful and throws a {@link DnsException} if the operation failed or the zone does not
* exist.
*/
public DnsBatchResult<Page<ChangeRequest>> listChangeRequests(
String zoneName, Dns.ChangeRequestListOption... options) {
Expand Down Expand Up @@ -191,11 +191,10 @@ public DnsBatchResult<ChangeRequest> getChangeRequest(

/**
* Adds a request representing the "apply change request" operation to the zone specified by
* {@code zoneName} to this batch. The {@code options} can be used to restrict the fields returned
* in the same way as for {@link Dns#applyChangeRequest(String, ChangeRequestInfo,
* Dns.ChangeRequestOption...)}. Calling {@link DnsBatchResult#get()} on the return value yields
* the created {@link ChangeRequest} if successful or throws a {@link DnsException} if the
* operation failed or the zone does not exist.
* {@code zoneName} to this batch. The {@code options} can restrict returned fields as for {@link
* Dns#applyChangeRequest(String, ChangeRequestInfo, Dns.ChangeRequestOption[])}. Calling {@link
* DnsBatchResult#get()} on the return value yields the created {@link ChangeRequest} if
* successful or throws a {@link DnsException} if the operation failed or the zone does not exist.
*/
public DnsBatchResult<ChangeRequest> applyChangeRequest(
String zoneName, ChangeRequestInfo changeRequest, Dns.ChangeRequestOption... options) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ public Builder setApiKey(String apiKey) {

/**
* Sets the code for the default target language. If not set, English ({@code en}) is used.
* Calls to {@link Translate#translate(List, TranslateOption...)} and {@link
* Translate#translate(String, TranslateOption...)} will use this value unless an option from
* Calls to {@link Translate#translate(List, Translate.TranslateOption[])} and {@link
* Translate#translate(String, Translate.TranslateOption[])} will use this value unless an
* {@link TranslateOption#targetLanguage(String)} is explicitly provided.
*
* @return the builder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public String getSourceLanguage() {
/**
* Returns the translation model used to translate the text. This value is only available if a
* result from {@link Translate.TranslateOption#model(String)} was passed to {@link
* Translate#translate(List, Translate.TranslateOption...)}.
* Translate#translate(List, Translate.TranslateOption[])}.
*
* <p>Please note that you must be whitelisted to use the {@link
* Translate.TranslateOption#model(String)} option, otherwise translation will fail.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/**
* Utility to create a remote translate configuration for testing. Translate options can be obtained
* via the {@link #getOptions()} ()} method. Returned options have custom {@link
* via the {@link #getOptions()} method. Returned options have custom {@link
* TranslateOptions#getRetrySettings()}: {@link RetrySettings#getMaxAttempts()} is {@code 10},
* {@link RetrySettings#getMaxRetryDelay()} is {@code 30000}, {@link
* RetrySettings#getTotalTimeout()} is {@code 120000} and {@link
Expand All @@ -52,8 +52,8 @@ public TranslateOptions getOptions() {
}

/**
* This method is obsolete because of a potential security risk. Use the {@link #create(String,
* GoogleCredentials)} method instead.
* Obsolete due to a potential security risk. Use {@link #create(String, GoogleCredentials)}
* instead.
*
* <p>If you know that you will be loading credential configurations of a specific type, it is
* recommended to use a credential-type-specific `fromStream()` method. This will ensure that an
Expand All @@ -68,8 +68,8 @@ public TranslateOptions getOptions() {
* <p>Regardless of the method used, it is always your responsibility to validate configurations
* received from external sources.
*
* <p>See the {@link <a
* href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>}
* <p>See the <a
* href="https://cloud.google.com/docs/authentication/external/externally-sourced-credentials">documentation</a>
* for more details.
*
* <p>Creates a {@code RemoteTranslateHelper} object for the given project id and JSON key input
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ private ApiFutures() {}
*
* @param future The future attach the callback to
* @param callback The callback to invoke when future is completed
* @deprecated Use {@linkplain #addCallback(ApiFuture, ApiFutureCallback, Executor) the overload
* that requires an executor}. For identical behavior, pass {@link
* @deprecated Use {@linkplain #addCallback(ApiFuture, ApiFutureCallback, Executor)}, the overload
* that requires an executor. For identical behavior, pass {@link
* com.google.common.util.concurrent.MoreExecutors#directExecutor}, but consider whether
* another executor would be safer.
*/
Expand Down Expand Up @@ -102,8 +102,8 @@ public void onSuccess(V v) {
* type
* @return A future whose result is taken either from the given {@code input} or by the {@code
* callback}
* @deprecated Use {@linkplain #catching(ApiFuture, Class, ApiFunction, Executor) the overload
* that requires an executor}. For identical behavior, pass {@link
* @deprecated Use {@linkplain #catching(ApiFuture, Class, ApiFunction, Executor)}, the overload
* that requires an executor. For identical behavior, pass {@link
* com.google.common.util.concurrent.MoreExecutors#directExecutor}, but consider whether
* another executor would be safer.
*/
Expand Down Expand Up @@ -228,8 +228,8 @@ public static <V> ApiFuture<V> immediateCancelledFuture() {
* @param function A Function to transform the results of the provided future to the results of
* the returned future
* @return A future that holds result of the transformation
* @deprecated Use {@linkplain #transform(ApiFuture, ApiFunction, Executor) the overload that
* requires an executor}. For identical behavior, pass {@link
* @deprecated Use {@linkplain #transform(ApiFuture, ApiFunction, Executor)}, the overload that
* requires an executor. For identical behavior, pass {@link
* com.google.common.util.concurrent.MoreExecutors#directExecutor}, but consider whether
* another executor would be safer.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ public RetryingFuture<ResponseT> createFuture(
* the specified by the {@link RetryingFuture#getAttemptSettings()} amount of time. As result,
* this method completes execution only after the specified {@code retryingFuture} completes.
*
* @param retryingFuture the future previously returned by {@link #createFuture(Callable,
* RetryingContext)}
* @param retryingFuture the future returned by {@link #createFuture(Callable, RetryingContext)}
* @return returns completed {@code retryingFuture}
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
@NullMarked
public interface ResultRetryAlgorithm<ResponseT> {
/**
* Same as {@link ResultRetryAlgorithmWithContext#createNextAttempt(RetryingContext, Throwable,
* Object, TimedAttemptSettings)}, but without a {@link RetryingContext}.
* Same as {@link ResultRetryAlgorithmWithContext#createNextAttempt}, but without a {@link
* RetryingContext}.
*
* <p>Use {@link ResultRetryAlgorithmWithContext#createNextAttempt(RetryingContext, Throwable,
* Object, TimedAttemptSettings)} instead of this method when possible.
* <p>Use {@link ResultRetryAlgorithmWithContext#createNextAttempt} instead of this method when
* possible.
*/
TimedAttemptSettings createNextAttempt(
Throwable prevThrowable, ResponseT prevResponse, TimedAttemptSettings prevSettings);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public class RetryAlgorithm<ResponseT> {
*
* @param resultAlgorithm result algorithm to use
* @param timedAlgorithm timed algorithm to use
* @deprecated use {@link RetryAlgorithm#RetryAlgorithm(ResultRetryAlgorithmWithContext,
* TimedRetryAlgorithmWithContext)} instead
* @deprecated Ignores {@link RetryingContext}. Instead, use {@link
* #RetryAlgorithm(ResultRetryAlgorithmWithContext, TimedRetryAlgorithmWithContext)}.
*/
@Deprecated
public RetryAlgorithm(
Expand Down Expand Up @@ -127,8 +127,8 @@ public TimedAttemptSettings createFirstAttempt(@Nullable RetryingContext context
* thrown instead
* @param previousSettings previous attempt settings
* @return next attempt settings, can be {@code null}, if no there should be no new attempt
* @deprecated use {@link #createNextAttempt(RetryingContext, Throwable, Object,
* TimedAttemptSettings)} instead
* @deprecated Ignores {@link RetryingContext}. Instead, use {@link
* #createNextAttempt(RetryingContext, Throwable, Object, TimedAttemptSettings)}.
*/
@Deprecated
public TimedAttemptSettings createNextAttempt(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ public RetryingFuture<ResponseT> createFuture(
/**
* Submits an attempt for execution in a different thread.
*
* @param retryingFuture the future previously returned by {@link #createFuture(Callable,
* RetryingContext)}
* @param retryingFuture the future returned by {@link #createFuture(Callable, RetryingContext)}
* @return submitted attempt future
*/
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ public final class StreamingRetryAlgorithm<ResponseT> extends RetryAlgorithm<Res
* #StreamingRetryAlgorithm(ResultRetryAlgorithmWithContext, TimedRetryAlgorithmWithContext)} to
* create an instance that will respect the {@link RetryingContext}.
*
* @deprecated use {@link #StreamingRetryAlgorithm(ResultRetryAlgorithmWithContext,
* TimedRetryAlgorithmWithContext)} instead
* @deprecated Use the context-aware constructor {@link
* #StreamingRetryAlgorithm(ResultRetryAlgorithmWithContext, TimedRetryAlgorithmWithContext)}
*/
@Deprecated
public StreamingRetryAlgorithm(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,19 @@ public interface TimedRetryAlgorithm {
TimedAttemptSettings createFirstAttempt();

/**
* Same as {@link TimedRetryAlgorithmWithContext#createNextAttempt(RetryingContext,
* TimedAttemptSettings)}, but without a {@link RetryingContext}.
* Same as {@link TimedRetryAlgorithmWithContext#createNextAttempt}, but without a {@link
* RetryingContext}.
*
* <p>Use {@link TimedRetryAlgorithmWithContext#createNextAttempt(RetryingContext,
* TimedAttemptSettings)} instead of this method when possible.
* <p>Use {@link TimedRetryAlgorithmWithContext#createNextAttempt} instead of this method when
* possible.
*/
TimedAttemptSettings createNextAttempt(TimedAttemptSettings prevSettings);

/**
* Same as {@link TimedRetryAlgorithmWithContext#shouldRetry(RetryingContext,
* TimedAttemptSettings)}, but without a {@link RetryingContext}.
* Same as {@link TimedRetryAlgorithmWithContext#shouldRetry}, but without a {@link
* RetryingContext}.
*
* <p>Use {@link TimedRetryAlgorithmWithContext#shouldRetry(RetryingContext,
* TimedAttemptSettings)} instead of this method when possible.
* <p>Use {@link TimedRetryAlgorithmWithContext#shouldRetry} instead of this method when possible.
*/
boolean shouldRetry(TimedAttemptSettings nextAttemptSettings) throws CancellationException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,7 @@ public final class Watchdog implements Runnable, BackgroundResource {
private final ScheduledExecutorService executor;
private ScheduledFuture<?> future;

/**
* This method is obsolete. Use {@link #createDuration(ApiClock, java.time.Duration,
* ScheduledExecutorService)} instead.
*/
/** This method is obsolete. Use {@link #createDuration} instead. */
@ObsoleteApi("Use createDuration(ApiClock, java.time.Duration, ScheduledExecutorService) instead")
public static Watchdog create(
ApiClock clock,
Expand Down Expand Up @@ -113,10 +110,7 @@ private void start() {
this, scheduleInterval.toMillis(), scheduleInterval.toMillis(), TimeUnit.MILLISECONDS);
}

/**
* This method is obsolete. Use {@link #watchDuration(ResponseObserver, java.time.Duration,
* java.time.Duration)} instead.
*/
/** This method is obsolete. Use {@link #watchDuration} instead. */
@ObsoleteApi(
"Use watchDuration(ResponseObserver, java.time.Duration, java.time.Duration) instead")
public <ResponseT> ResponseObserver<ResponseT> watch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static RetryOption maxAttempts(int maxAttempts) {
return new RetryOption(OptionType.MAX_ATTEMPTS, maxAttempts);
}

/** See {@link RetrySettings#isJittered()} ()}. */
/** See {@link RetrySettings#isJittered()}. */
public static RetryOption jittered(boolean jittered) {
return new RetryOption(OptionType.JITTERED, jittered);
}
Expand Down
Loading