Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API cleanup for Async Volley stack ahead of 1.2.0 release. #398

Merged
merged 1 commit into from
Feb 17, 2021
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
7 changes: 6 additions & 1 deletion src/main/java/com/android/volley/AsyncCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@

import androidx.annotation.Nullable;

/** Asynchronous equivalent to the {@link Cache} interface. */
/**
* Asynchronous equivalent to the {@link Cache} interface.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public abstract class AsyncCache {

public interface OnGetCompleteCallback {
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/android/volley/AsyncNetwork.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.atomic.AtomicReference;

/** An asynchronous implementation of {@link Network} to perform requests. */
/**
* An asynchronous implementation of {@link Network} to perform requests.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public abstract class AsyncNetwork implements Network {
private ExecutorService mBlockingExecutor;
private ExecutorService mNonBlockingExecutor;
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/android/volley/AsyncRequestQueue.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@
* An asynchronous request dispatch queue.
*
* <p>Add requests to the queue with {@link #add(Request)}. Once completed, responses will be
* delivered on the main thread (unless a custom {@link ResponseDelivery} has been provided)
* delivered on the main thread (unless a custom {@link ResponseDelivery} has been provided).
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public class AsyncRequestQueue extends RequestQueue {
/** Default number of blocking threads to start. */
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/android/volley/RequestTask.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package com.android.volley;

/** Abstract runnable that's a task to be completed by the RequestQueue. */
/**
* Abstract runnable that's a task to be completed by the RequestQueue.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public abstract class RequestTask<T> implements Runnable {
final Request<T> mRequest;

Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/android/volley/cronet/CronetHttpStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@

/**
* A {@link AsyncHttpStack} that's based on Cronet's fully asynchronous API for network requests.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public class CronetHttpStack extends AsyncHttpStack {

Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/android/volley/toolbox/AsyncHttpStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
import java.util.concurrent.ExecutorService;
import java.util.concurrent.atomic.AtomicReference;

/** Asynchronous extension of the {@link BaseHttpStack} class. */
/**
* Asynchronous extension of the {@link BaseHttpStack} class.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public abstract class AsyncHttpStack extends BaseHttpStack {
private ExecutorService mBlockingExecutor;
private ExecutorService mNonBlockingExecutor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@
import java.util.Map;
import java.util.concurrent.ExecutorService;

/** A network performing Volley requests over an {@link HttpStack}. */
/**
* A network performing Volley requests over an {@link HttpStack}.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public class BasicAsyncNetwork extends AsyncNetwork {

private final AsyncHttpStack mAsyncStack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* Utility class for methods that are shared between {@link BasicNetwork} and {@link
* BasicAsyncNetwork}
*/
public final class NetworkUtility {
final class NetworkUtility {
private static final int SLOW_REQUEST_THRESHOLD_MS = 3000;

private NetworkUtility() {}
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/android/volley/toolbox/NoAsyncCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import com.android.volley.AsyncCache;
import com.android.volley.Cache;

/** An AsyncCache that doesn't cache anything. */
/**
* An AsyncCache that doesn't cache anything.
*
* <p><b>WARNING</b>: This API is experimental and subject to breaking changes. Please see
* https://github.com/google/volley/wiki/Asynchronous-Volley for more details.
*/
public class NoAsyncCache extends AsyncCache {
@Override
public void get(String key, OnGetCompleteCallback callback) {
Expand Down