Interface RequestSubmitter
-
- All Known Subinterfaces:
RemoteTransaction
- All Known Implementing Classes:
Client,Client.AliasClusteredClient,Client.ClusteredClient,Client.PinnedClient,HttpRemoteTransaction
public interface RequestSubmitterDefines the synchronous request submission contract for Gremlin requests.This interface is implemented by both
Clientand transaction classes to ensure a consistent API for submitting Gremlin scripts. The synchronous nature of these methods means they block until the request completes.For asynchronous submission, see
RequestSubmitterAsync.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResultSetsubmit(String gremlin)Submits a Gremlin script and blocks until the response is received.ResultSetsubmit(String gremlin, Map<String,Object> parameters)Submits a Gremlin script with bound parameters and blocks until the response is received.ResultSetsubmit(String gremlin, RequestOptions options)Submits a Gremlin script with request options and blocks until the response is received.
-
-
-
Method Detail
-
submit
ResultSet submit(String gremlin)
Submits a Gremlin script and blocks until the response is received.- Parameters:
gremlin- the Gremlin script to execute- Returns:
- the results of the script execution
-
submit
ResultSet submit(String gremlin, Map<String,Object> parameters)
Submits a Gremlin script with bound parameters and blocks until the response is received.Prefer this method over string concatenation when executing scripts with variable arguments, as parameterized scripts perform better.
- Parameters:
gremlin- the Gremlin script to executeparameters- a map of parameters that will be bound to the script on execution- Returns:
- the results of the script execution
-
submit
ResultSet submit(String gremlin, RequestOptions options)
Submits a Gremlin script with request options and blocks until the response is received.- Parameters:
gremlin- the Gremlin script to executeoptions- the options to supply for this request- Returns:
- the results of the script execution
-
-