Class RequestQueue


  • public class RequestQueue
    extends java.lang.Object
    This class encapsulates the holding of Requests for resources.
    • Field Detail

      • myRequests

        protected java.util.List<Request> myRequests
        Holds requests that are waiting for some units of the resource
    • Constructor Detail

      • RequestQueue

        public RequestQueue()
    • Method Detail

      • add

        public void add​(Request request)
        Adds the request to the list of waiting requests based on the Comparable interface for Request
        Parameters:
        request -
      • size

        public int size()
      • remove

        public Request remove​(int arg0)
      • remove

        public boolean remove​(Request arg0)
      • listIterator

        public java.util.ListIterator<Request> listIterator​(int arg0)
      • listIterator

        public java.util.ListIterator<Request> listIterator()
      • lastIndexOf

        public int lastIndexOf​(Request arg0)
      • iterator

        public java.util.Iterator<Request> iterator()
      • isEmpty

        public boolean isEmpty()
      • indexOf

        public int indexOf​(Request arg0)
      • get

        public Request get​(int arg0)
      • containsAll

        public boolean containsAll​(java.util.Collection<Request> arg0)
      • contains

        public boolean contains​(Request arg0)
      • clear

        public void clear()