Dequques all the currently pending callbacks.
@return A list of all pending callbacks.
510985
public List<Callback> pendingCallbacks() {
        ObjectNode req = makeRequest("callbacks");
        JsonNode resp = this.runtime.requestResponse(req);

        JsonNode callbacksResp = resp.get("callbacks");
        if (callbacksResp == null || !callbacksResp.isArray()) {
            throw new JsiiException("Expecting a 'callbacks' key with an array in response");
        }

        ArrayNode callbacksArray = (ArrayNode) callbacksResp;

        List<Callback> result = new ArrayList<>();
        callbacksArray.forEach(node -> {
            result.add(JsiiObjectMapper.treeToValue(node, Callback.class));
        });

        return result;
    }
951007
public java.util.List<com.google.javascript.jscomp.Requirement> getRequirementList() {
    return requirement_;
  }
188767
public synchronized Collection<T> getAll() {
    List<T> all = new ArrayList<T>(size);
    for (T e = head; e != null; e = e.getNext()) {
      all.add(e);
    }
    return all;
  }
1314670
public ArrayList getThreads()
  {
    if (tc.isEntryEnabled())
    {
      SibTr.entry(tc, "getThreads");
      SibTr.exit(tc, "getThreads", _threadCache);
    }
    return _threadCache;
  }
186495
public CallOptions withoutWaitForReady() {
    CallOptions newOptions = new CallOptions(this);
    newOptions.waitForReady = Boolean.FALSE;
    return newOptions;
  }
1151575
@Pure
	public List<Object> getCurrentValues() {
		if (this.allValues == null) {
			return Collections.emptyList();
		}
		return Collections.unmodifiableList(this.allValues);
	}
616652
public java.util.List<ClientVpnEndpoint> getClientVpnEndpoints() {
        if (clientVpnEndpoints == null) {
            clientVpnEndpoints = new com.amazonaws.internal.SdkInternalList<ClientVpnEndpoint>();
        }
        return clientVpnEndpoints;
    }
1193105
public java.util.List<Lag> getLags() {
        if (lags == null) {
            lags = new com.amazonaws.internal.SdkInternalList<Lag>();
        }
        return lags;
    }
1300239
public java.util.List<CancelSpotFleetRequestsSuccessItem> getSuccessfulFleetRequests() {
        if (successfulFleetRequests == null) {
            successfulFleetRequests = new com.amazonaws.internal.SdkInternalList<CancelSpotFleetRequestsSuccessItem>();
        }
        return successfulFleetRequests;
    }
764467
public synchronized List<LocalQueue> updatedQueues()
    {
    	List<LocalQueue> updatedQueues = new ArrayList<>(items.size());
    	for (int i = 0 ; i < items.size() ; i++)
        {
    		TransactionItem item = items.get(i);
            LocalQueue localQueue = item.getDestination();
            if (!updatedQueues.contains(localQueue))
                updatedQueues.add(localQueue);
        }
    	
    	return updatedQueues;
    }
41742
private Queue<ReadFuture> getWaitingReadFutures() {
        Queue<ReadFuture> waitingReadyReadFutures =
            (Queue<ReadFuture>) getAttribute(WAITING_READ_FUTURES_KEY);
        if (waitingReadyReadFutures == null) {
            waitingReadyReadFutures = new CircularQueue<>();

            Queue<ReadFuture> oldWaitingReadyReadFutures =
                (Queue<ReadFuture>) setAttributeIfAbsent(
                        WAITING_READ_FUTURES_KEY, waitingReadyReadFutures);
            if (oldWaitingReadyReadFutures != null) {
                waitingReadyReadFutures = oldWaitingReadyReadFutures;
            }
        }
        return waitingReadyReadFutures;
    }
420805
public List<Migration> getPendingMigrations() {
        List<String> appliedMigrations = getAppliedMigrationVersions();

        List<Migration> allMigrations = migrationResolver.resolve();
        List<Migration> pendingMigrations = new ArrayList<Migration>();
        for (Migration migration : allMigrations) {
            if(!appliedMigrations.contains(migration.getVersion())){
                pendingMigrations.add(migration);
            }
        }
        return pendingMigrations;
    }
1058084
function() {
        var _status = STATUS_PENDING;
        var _args;
        var _callbacks = {
            success: [],
            fail: [],
            done: []
        };

        function _registerCallback(resultType, callback) {
            if (typeof callback !== 'function') {
                //Invalid input args. Throw an error.
                throw 'Invalid argument: callback. Must be a function.';
            }

            if (_status !== STATUS_PENDING) {
                if (_status === resultType || resultType === RESULT_TYPE_DONE) {
                    // Promise has already been satisfied. Just invoke the
                    // callback.
                    callback.apply(null, _args);
                }
            } else {
                // Promise has not yet been satisfied. Remember it, and
                // invoke when ready.
                _callbacks[resultType].push(callback);
            }
        }

        function _satisfy(resultType, args) {
            if (_status !== STATUS_PENDING) {
                return;
            }
            _args = args;
            _status = resultType;

            function doCallback(item, index) {
                item.apply(null, _args);
            }

            //Trigger any callbacks that have been queued.
            _callbacks[resultType].forEach(doCallback);
            _callbacks.done.forEach(doCallback);

            //Clear out any callback references.
            _callbacks.succes = [];
            _callbacks.fail = [];
            _callbacks.done = [];
        }

        var _promise = {
            /*
             * Invoked to allow callers to register callbacks that will be
             * triggered on completion of the deferred activity. This callback
             * will be triggered whether or not the completion was successful.
             */
            done: function(callback) {
                _registerCallback(RESULT_TYPE_DONE, callback);
                return (_promise);
            },

            /*
             * Invoked to allow callers to register callbacks that will be
             * triggered on successful completion of the deferred activity.
             */
            success: function(callback) {
                _registerCallback(STATUS_SUCCESS, callback);
                return (_promise);
            },

            /*
             * Invoked to allow callers to register callbacks that will be
             * triggered on unsuccessful completion of the deferred activity.
             */
            fail: function(callback) {
                _registerCallback(STATUS_FAIL, callback);
                return (_promise);
            },

            /* 
             * Returns the results returned by the deferred activity.
             */
            results: function() {
                return _args;
            }
        }

        var deferredObject = {
            /*
             * Allows a callback to be registered that will be called once the
             * deferred has been resolved or rejected.
             */
            done: _promise.done,

            /*
             * Allows a callback to be registered that will be called once the
             * deferred has been resolved.
             */
            success: _promise.success,

            /*
             * Allows a callback to be registered that will be called once the
             * deferred has been rejected.
             */
            fail: _promise.fail,

            /*
             * Fulfills the promise by resolving it.
             */
            resolve: function() {
                _satisfy(STATUS_SUCCESS, Array.prototype.slice.call(arguments, 0));
            },

            /*
             * Fulfills the promise by rejecting it.
             */
            reject: function() {
                _satisfy(STATUS_FAIL, Array.prototype.slice.call(arguments, 0));
            },

            /*
             * Gets a promise associated with the deferred object.
             */
            promise: function() {
                return Object.create(_promise);
            },

            /*
             * Generates a callback that resolves/rejects the deferred object
             * based on the success/failure of an operation, determined by the
             * first argument in.
             */
            getResolver: function() {
                var ctxArgs = Array.prototype.slice.call(arguments, 0);
                return function(err, data) {
                    if (!err) {
                        var args = Array.prototype.slice.call(arguments, 1);
                        deferredObject.resolve.apply(null,
                            ctxArgs.concat(args));
                    } else {
                        deferredObject.reject.apply(null,
                            ctxArgs.concat([err]));
                    }
                };
            },

            /*
             * Generates a callback that resolves/rejects the deferred after a
             * specified number of steps have been completed, indicated by the
             * invocation of stepComplete().
             */
            getMultiStepResolver: function(count) {
                var _count = count;
                var ctxArgs = Array.prototype.slice.call(arguments, 1);

                // If the step count is zero, resolve immediately.
                if (_count === 0) {
                    deferredObject.resolve.apply(null, ctxArgs);
                }

                return {
                    /*
                     * Indicates that a specific step was completed. The
                     * promise will be treated as resolved if this method
                     * is invoked a given number of times.
                     */
                    stepComplete: function() {
                        var ca
                        _count--;
                        if (_count === 0) {
                            var args = Array.prototype.slice.call(arguments, 0);
                            deferredObject.resolve.apply(null,
                                ctxArgs.concat(args));
                        }
                    },

                    /*
                     * Rejects the deferred object without waiting for any
                     * further processing.
                     */
                    reject: function() {
                        var args = Array.prototype.slice.call(arguments, 0);
                        deferredObject.reject.apply(null, ctxArgs.concat(args));
                    }
                }
            }
        };

        return deferredObject;
    }
522107
public List<Long> fetchIncoming() { // TODO: replace with primitive specialization
        if (incoming == null || incoming.isEmpty()) {
            //return EMPTY_LONG_LIST;
            return Collections.emptyList(); // TODO: replace with primitive specialization
        }
        //TLongList result = incoming;
        List<Long> result = incoming;
        this.incoming = null;
        return result;
    }
927439
public java.util.List<ResourcePendingMaintenanceActions> getPendingMaintenanceActions() {
        if (pendingMaintenanceActions == null) {
            pendingMaintenanceActions = new com.amazonaws.internal.SdkInternalList<ResourcePendingMaintenanceActions>();
        }
        return pendingMaintenanceActions;
    }
108219
public List<ConnectionListener> getConnectionListeners() {
        if (changes == null) {
            return (List<ConnectionListener>)Collections.EMPTY_LIST;
        }

        List<EventListener> listeners = changes.getListenerList(AMQP);
        if ((listeners == null) || listeners.isEmpty()) {
            return (List<ConnectionListener>)Collections.EMPTY_LIST;
        }

        ArrayList<ConnectionListener> list = new ArrayList<ConnectionListener>();
        for (EventListener listener : listeners) {
            list.add((ConnectionListener)listener);
        }

        return list;
    }
882154
private List<Runnable> drainQueue() {
        BlockingQueue<Runnable> q = workQueue;
        ArrayList<Runnable> taskList = new ArrayList<>();
        q.drainTo(taskList);
        if (!q.isEmpty()) {
            for (Runnable r : q.toArray(new Runnable[0])) {
                if (q.remove(r))
                    taskList.add(r);
            }
        }
        return taskList;
    }