Class PoolMaster


  • public class PoolMaster
    extends java.lang.Object
    INTERNAL API

    API for accessing the global pool master actor.

    • Constructor Summary

      Constructors 
      Constructor Description
      PoolMaster​(akka.actor.ActorRef ref)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static PoolMaster apply​(akka.actor.ExtendedActorSystem system)  
      scala.concurrent.Future<HttpResponse> dispatchRequest​(PoolId poolId, HttpRequest request, akka.stream.Materializer fm)
      Send a request through the corresponding pool.
      scala.concurrent.Future<java.lang.Object> poolSize()
      For testing only
      akka.actor.ActorRef ref()  
      scala.concurrent.Future<akka.Done> shutdown​(PoolId poolId)
      Shutdown the corresponding pool and signal its termination.
      scala.concurrent.Future<akka.Done> shutdownAll()
      Triggers an orderly shutdown of all host connections pools currently maintained by the ActorSystem.
      void startPool​(PoolId poolId, akka.stream.Materializer fm)
      Start the corresponding pool to make it ready to serve requests.
      • Methods inherited from class java.lang.Object

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

      • PoolMaster

        public PoolMaster​(akka.actor.ActorRef ref)
    • Method Detail

      • apply

        public static PoolMaster apply​(akka.actor.ExtendedActorSystem system)
      • ref

        public akka.actor.ActorRef ref()
      • dispatchRequest

        public scala.concurrent.Future<HttpResponse> dispatchRequest​(PoolId poolId,
                                                                     HttpRequest request,
                                                                     akka.stream.Materializer fm)
        Send a request through the corresponding pool. If the pool is not running, it will be started automatically. If it is shutting down, it will restart as soon as the shutdown operation is complete and serve this request.

        Parameters:
        request - the request
        poolId - (undocumented)
        fm - (undocumented)
        Returns:
        the response
      • startPool

        public void startPool​(PoolId poolId,
                              akka.stream.Materializer fm)
        Start the corresponding pool to make it ready to serve requests. If the pool is already started, this does nothing. If it is being shutdown, it will restart as soon as the shutdown operation is complete.

        Parameters:
        poolId - (undocumented)
        fm - (undocumented)
      • shutdown

        public scala.concurrent.Future<akka.Done> shutdown​(PoolId poolId)
        Shutdown the corresponding pool and signal its termination. If the pool is not running or is being shutting down, this does nothing.

        The shutdown will wait for all ongoing requests to be completed.

        Parameters:
        poolId - (undocumented)
        Returns:
        a Future completed when the pool has been shutdown.
      • shutdownAll

        public scala.concurrent.Future<akka.Done> shutdownAll()
        Triggers an orderly shutdown of all host connections pools currently maintained by the ActorSystem. The returned future is completed when all pools that were live at the time of this method call have completed their shutdown process.

        If existing pool client flows are re-used or new ones materialized concurrently with or after this method call the respective connection pools will be restarted and not contribute to the returned future.

        Returns:
        (undocumented)
      • poolSize

        public scala.concurrent.Future<java.lang.Object> poolSize()
        For testing only
        Returns:
        (undocumented)