Class RequestReactorAdapter

  • All Implemented Interfaces:
    RequestReactorIfc

    public class RequestReactorAdapter
    extends java.lang.Object
    implements RequestReactorIfc
    A convenience class that implements the RequestReactorIfc. Clients can sub-class this base class and override only those methods that they are interested in. It would be very common to just override the completed() method
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void allocated​(Request request)
      Called when the request is placed in the using state
      void canceled​(Request request)
      Called when the request is placed in the canceled state
      void completed​(Request request)
      Called when the request is placed in the completed state
      void dequeued​(Request request, Queue<Request> queue)
      Called when the request is dequeued from the waiting state
      void enqueued​(Request request, Queue<Request> queue)
      Called when the request is placed in the waiting state
      void preempted​(Request request)
      Called when the request is placed in the preempted state
      void prepared​(Request request)
      Called when the request is placed in the prepared state.
      void resumed​(Request request)
      Called when the request is resumed from the preempted state
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestReactorAdapter

        public RequestReactorAdapter()
    • Method Detail

      • enqueued

        public void enqueued​(Request request,
                             Queue<Request> queue)
        Description copied from interface: RequestReactorIfc
        Called when the request is placed in the waiting state
        Specified by:
        enqueued in interface RequestReactorIfc
        Parameters:
        request - the request
        queue - the queue that was entered
      • dequeued

        public void dequeued​(Request request,
                             Queue<Request> queue)
        Description copied from interface: RequestReactorIfc
        Called when the request is dequeued from the waiting state
        Specified by:
        dequeued in interface RequestReactorIfc
        Parameters:
        request - the request
        queue - the queue that was exited
      • canceled

        public void canceled​(Request request)
        Description copied from interface: RequestReactorIfc
        Called when the request is placed in the canceled state
        Specified by:
        canceled in interface RequestReactorIfc
        Parameters:
        request - the request
      • preempted

        public void preempted​(Request request)
        Description copied from interface: RequestReactorIfc
        Called when the request is placed in the preempted state
        Specified by:
        preempted in interface RequestReactorIfc
        Parameters:
        request - the request
      • allocated

        public void allocated​(Request request)
        Description copied from interface: RequestReactorIfc
        Called when the request is placed in the using state
        Specified by:
        allocated in interface RequestReactorIfc
        Parameters:
        request - the request
      • completed

        public void completed​(Request request)
        Description copied from interface: RequestReactorIfc
        Called when the request is placed in the completed state
        Specified by:
        completed in interface RequestReactorIfc
        Parameters:
        request - the request
      • prepared

        public void prepared​(Request request)
        Description copied from interface: RequestReactorIfc
        Called when the request is placed in the prepared state. The request is now prepared to use the resource.
        Specified by:
        prepared in interface RequestReactorIfc
        Parameters:
        request - the request
      • resumed

        public void resumed​(Request request)
        Description copied from interface: RequestReactorIfc
        Called when the request is resumed from the preempted state
        Specified by:
        resumed in interface RequestReactorIfc
        Parameters:
        request - the request