Class ViewServiceConfig

java.lang.Object
com.couchbase.client.core.env.AbstractServiceConfig
com.couchbase.client.core.env.ViewServiceConfig

public final class ViewServiceConfig
extends AbstractServiceConfig
Allows to configure a View Service on a per-node basis.
Since:
1.4.2
Author:
Michael Nitschinger
  • Method Details

    • create

      public static ViewServiceConfig create​(int minEndpoints, int maxEndpoints)
      Creates a ViewServiceConfig with the default idle time. This constructor creates a config with the AbstractServiceConfig.DEFAULT_IDLE_TIME. It allows to configure both the minimum number of endpoints per node to be present at every point in time as well as the allowed maximum. If an endpoint is idle longer than the configured idle time and the service pool does not fall below the configured minimum, it is removed from the pool.
      Parameters:
      minEndpoints - minimum number of endpoints to be used
      maxEndpoints - maximum number of endpoints to be used
      Returns:
      the created ViewServiceConfig.
    • create

      public static ViewServiceConfig create​(int minEndpoints, int maxEndpoints, int idleTime)
      Creates a ViewServiceConfig with a custom idle time. This constructor creates a config with a custom idle timeout. It allows to configure both the minimum number of endpoints per node to be present at every point in time as well as the allowed maximum. If an endpoint is idle longer than the configured idle time and the service pool does not fall below the configured minimum, it is removed from the pool.
      Parameters:
      minEndpoints - minimum number of endpoints to be used
      maxEndpoints - maximum number of endpoints to be used
      idleTime - the configured idle time
      Returns:
      the created ViewServiceConfig.
    • toString

      public String toString()
      Overrides:
      toString in class AbstractServiceConfig