Class PoolMasterActor

  • All Implemented Interfaces:,

    public final class PoolMasterActor
    extends java.lang.Object

    Manages access to a host connection pool or rather: a sequence of pool incarnations.

    A host connection pool for a given HostConnectionPoolSetup is a running stream, whose outside interface is provided by its PoolInterface actor. The actor accepts PoolInterface.PoolRequest messages and completes their responsePromise whenever the respective response has been received (or an error occurred).

    The PoolMasterActor provides a layer of indirection between a PoolId, which represents a pool, and the PoolInterface instances which are created on-demand and stopped after an idle-timeout.

    Several PoolId objects may be mapped to the same pool if they have the same HostConnectionPoolSetup and are marked as being shared. This is the case for example for gateways obtained through HttpExt.cachedHostConnectionPool. Some other gateways are not shared, such as those obtained through HttpExt.newHostConnectionPool, and will have their dedicated restartable pool.

    • Constructor Detail

      • PoolMasterActor

        public PoolMasterActor()
    • Method Detail

      • props

        public static props()
      • context

        public context()
        Specified by:
        context in interface
      • self

        public final self()
        Specified by:
        self in interface
      • receive

        public scala.PartialFunction<java.lang.Object,​scala.runtime.BoxedUnit> receive()
        Specified by:
        receive in interface