Class RequestQueueImpl

  • All Implemented Interfaces:
    RequestQueue

    public class RequestQueueImpl
    extends java.lang.Object
    implements RequestQueue
    An implementation of RequestQueue behaving as a queue of AuRequest. There is one queue for each desktop.

    Implementation Note: Unlike only of desktop members, this class must be thread-safe.

    Author:
    tomyeh
    • Constructor Detail

      • RequestQueueImpl

        public RequestQueueImpl()
    • Method Detail

      • addPerfRequestId

        public void addPerfRequestId​(java.lang.String requestId)
        Description copied from interface: RequestQueue
        Adds a request ID that uniquely identifies a request for performance measurement PerformanceMeter.
        Specified by:
        addPerfRequestId in interface RequestQueue
        Parameters:
        requestId - the request ID (never null)
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: RequestQueue
        Returns if no more request available in the queue.
        Specified by:
        isEmpty in interface RequestQueue
        Returns:
        whether no more request is available in the queue.
      • nextRequest

        public AuRequest nextRequest()
        Description copied from interface: RequestQueue
        Returns the next request, or null if no more request. Once returned, the request is removed from the queue.
        Specified by:
        nextRequest in interface RequestQueue
      • addRequests

        public void addRequests​(java.util.Collection<AuRequest> requests)
        Description copied from interface: RequestQueue
        Adds a list of requests to the queue. Notice that when the request is added, it will be activated first, i.e., AuRequest.activate() will be called before adding to queue. If the component is not found or does not belong to the current execution, it will be ignored.
        Specified by:
        addRequests in interface RequestQueue