Class SessionParams.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • addCluster

        public SessionParams.Builder addCluster​(Cluster cluster)
        Add a Vespa installation for feeding documents into.
        Returns:
        this Builder instance, to support chaining
      • setFeedParams

        public SessionParams.Builder setFeedParams​(FeedParams feedParams)
        Set parameters used for feeding the documents in the receiving cluster. Reasonable defaults are supplied, so setting this should not be necessary for testing.
        Returns:
        this builder instance to support chaining
      • setConnectionParams

        public SessionParams.Builder setConnectionParams​(ConnectionParams connectionParams)
        Transport parameters, like custom HTTP headers.
        Returns:
        this Builder instance, to support chaining
      • setErrorReporter

        public SessionParams.Builder setErrorReporter​(SessionParams.ErrorReporter errorReporter)
        Sets an error reporter that is invoked in case of serious errors.
        Parameters:
        errorReporter - the handler
        Returns:
        pointer to builder.
      • setClientQueueSize

        public SessionParams.Builder setClientQueueSize​(int clientQueueSize)
        Sets the maximum number of document operations to hold in memory, waiting to be sent to Vespa. When this threshold is reached, OutputStream.close() will block, see Session.stream(CharSequence).
        Parameters:
        clientQueueSize - the maximum number of document operations to hold in memory.
        Returns:
        pointer to builder.
      • setThrottlerMinSize

        public SessionParams.Builder setThrottlerMinSize​(int throttlerMinSize)
        Sets the minimum queue size of the throttler. If this is zero, it means that dynamic throttling is not enabled. Otherwise it is the minimum size of the throttler for how many parallel requests that are accepted. The max size of the throttler is the clientQueueSize.
        Parameters:
        throttlerMinSize - the value of the min size.
        Returns:
        the minimum number of requests to be used in throttler or zero if throttler is static.
      • getFeedParams

        public FeedParams getFeedParams()
      • getClientQueueSize

        public int getClientQueueSize()
      • getThrottlerMinSize

        public int getThrottlerMinSize()