Skip to content

Instantly share code, notes, and snippets.

@zaidhoona
zaidhoona / SerialRequestQueue.java
Last active May 26, 2019 14:30
Volley Serial Request Queue
public class SerialQueue {
private static final int MAX_CACHE_SIZE = 2097152; //2 MB
private static final int MAX_SERIAL_THREAD_POOL_SIZE = 1;
private static final int MAX_MULTI_THREAD_POOL_SIZE = 4;
private static RequestQueue serialRequestQueue;
/**
* Use to fetch the serial request queue
*/
public static RequestQueue getSerialRequestQueue(Context context) {