Class RequestOptions.Builder

java.lang.Object
org.apache.tinkerpop.gremlin.driver.RequestOptions.Builder
Enclosing class:
RequestOptions

public static final class RequestOptions.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • from

      public static RequestOptions.Builder from(RequestOptions options)
      Creates a RequestOptions.Builder populated with the values from the provided RequestOptions.
      Parameters:
      options - the options to copy from
      Returns:
      a RequestOptions.Builder with the copied options
    • traversalSource

      public RequestOptions.Builder traversalSource(String traversalSource)
      Sets the traversal source (or graph) alias to rebind to "g" on the request.
    • addParameter

      public RequestOptions.Builder addParameter(String name, Object value)
      Adds a parameter to the request. The parameter map is converted to a gremlin-lang map literal string when the request is built. This method accumulates parameters into an internal map which is converted on create().

      Cannot be mixed with addParametersString(String).

    • addParametersString

      public RequestOptions.Builder addParametersString(String parametersString)
      Sets the parameters as a pre-formatted gremlin-lang map literal string. This allows users to pass parameters as a raw gremlin-lang string when using the Client API with a gremlin string.

      Cannot be mixed with addParameter(String, Object).

    • batchSize

      public RequestOptions.Builder batchSize(int batchSize)
      The per client request override for the client and server configured resultIterationBatchSize. If this value is not set, then the configuration for the Cluster is used unless the RequestMessage is configured completely by the user.
    • timeoutMillis

      public RequestOptions.Builder timeoutMillis(long timeoutMillis)
      The per client request override in milliseconds for the server configured timeoutMillis (the maximum time a request is allowed to execute on the server before it times out). If this value is not set, then the configuration for the server is used.
    • language

      public RequestOptions.Builder language(String language)
      Sets the language identifier to be sent on the request.
    • materializeProperties

      public RequestOptions.Builder materializeProperties(String materializeProperties)
      Sets the materializeProperties identifier to be sent on the request.
    • bulkResults

      public RequestOptions.Builder bulkResults(boolean bulking)
      Sets the bulkResults flag to be sent on the request. A value of turn will enable server to bulk results.
    • transactionId

      public RequestOptions.Builder transactionId(String id)
      Sets the transactionId value to be sent on the request.
    • create

      public RequestOptions create()