Class RequestParameters
- java.lang.Object
-
- com.faunadb.common.models.request.RequestParameters
-
public class RequestParameters extends Object
Defines parameters which be included with the outgoing request.
-
-
Constructor Summary
Constructors Constructor Description RequestParameters()
Constructs an emptyRequestParameters
instanceRequestParameters(Optional<Duration> timeout, Optional<String> traceId, Map<String,String> tags)
Constructs aRequestParameters
instance, using the provided inputs.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RequestParameters
fromOptionalTimeout(Optional<Duration> timeout)
Constructs aRequestParameters
instance from a provided timeoutMap<String,String>
getTags()
Get the tags associated with this requestOptional<Duration>
getTimeout()
Get the timeout associated with this requestOptional<String>
getTraceId()
Get the traceId associated with this request
-
-
-
Constructor Detail
-
RequestParameters
public RequestParameters()
Constructs an emptyRequestParameters
instance
-
RequestParameters
public RequestParameters(Optional<Duration> timeout, Optional<String> traceId, Map<String,String> tags)
Constructs aRequestParameters
instance, using the provided inputs.- Parameters:
timeout
- Timeout for the requesttraceId
- A unique identifier for this query. Adheres to the [W3C Trace Context](https://w3c.github.io/trace-context) spec.tags
- Key-value pair metadata to associate with this query.- Throws:
IllegalArgumentException
- If the number of tags provided exceeds the maximum.
-
-
Method Detail
-
fromOptionalTimeout
public static RequestParameters fromOptionalTimeout(Optional<Duration> timeout)
Constructs aRequestParameters
instance from a provided timeout- Parameters:
timeout
-- Returns:
RequestParameters
-
getTimeout
public Optional<Duration> getTimeout()
Get the timeout associated with this request- Returns:
- timeout
-
getTraceId
public Optional<String> getTraceId()
Get the traceId associated with this request- Returns:
- traceId
-
-