Class ConcurrentStatefulDriverPoolPool

    • Constructor Detail

      • ConcurrentStatefulDriverPoolPool

        ConcurrentStatefulDriverPoolPool()
    • Method Detail

      • hasNoPossibility

        @Synchronized() final Boolean hasNoPossibility(BrowserId browserId)

        Check if the browser has no possibility to provide a webdriver for new tasks.

        Parameters:
        browserId - The id of the browser and its corresponding driver pool.
        Returns:

        True if the browser has no possibility to provide a webdriver for new tasks, false otherwise.

      • hasPossibility

        @Synchronized() final Boolean hasPossibility(BrowserId browserId)

        Check if the browser has possibility to provide a webdriver for new tasks.

        Parameters:
        browserId - The id of the browser and its corresponding driver pool.
        Returns:

        True if the browser has possibility to provide a webdriver for new tasks, false otherwise.

      • promisedDriverCount

        @Synchronized() final Integer promisedDriverCount(BrowserId browserId, Integer capacity)

        Return the number of new drivers can offer by the pool at the calling time point.

        If the driver pool is retired or closed, no new driver can offer. If the driver pool is not created yet, it can offer capacity drivers at top.

        Parameters:
        browserId - The id of the webdriver pool.
        capacity - The capacity of a driver pool.
        Returns:

        The number of new drivers can offer by the pool at the calling time point.

      • isFullCapacity

        @Synchronized() final Boolean isFullCapacity(BrowserId browserId)

        Check if a webdriver pool is full capacity, so it can not provide a webdriver for new tasks. Note that if a driver pool is retired or closed, it's not full capacity.

        Parameters:
        browserId - The id of the webdriver pool.
        Returns:

        True if the webdriver pool is full capacity, false otherwise.

      • subscribeDriver

        @Beta()@Synchronized() final WebDriver subscribeDriver(BrowserId browserId)
      • close

        @Synchronized() final Unit close()