Interface RequestSubmitterAsync
-
- All Known Implementing Classes:
Client,Client.AliasClusteredClient,Client.ClusteredClient,Client.PinnedClient
public interface RequestSubmitterAsyncDefines the asynchronous request submission contract for Gremlin requests.This interface is implemented by
Clientto provide non-blocking request submission. The returnedCompletableFuturecompletes when the write of the request is complete, not when the response is received.Note: Transaction classes intentionally do not implement this interface because transactional operations require sequential execution to maintain ordering guarantees over HTTP.
For synchronous submission, see
RequestSubmitter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CompletableFuture<ResultSet>submitAsync(String gremlin)Submits a Gremlin script asynchronously.CompletableFuture<ResultSet>submitAsync(String gremlin, Map<String,Object> parameters)Submits a Gremlin script with bound parameters asynchronously.CompletableFuture<ResultSet>submitAsync(String gremlin, RequestOptions options)Submits a Gremlin script with request options asynchronously.
-
-
-
Method Detail
-
submitAsync
CompletableFuture<ResultSet> submitAsync(String gremlin)
Submits a Gremlin script asynchronously.The returned future completes when the write of the request is complete.
- Parameters:
gremlin- the Gremlin script to execute- Returns:
- a future that completes with the results when the request write is complete
-
submitAsync
CompletableFuture<ResultSet> submitAsync(String gremlin, Map<String,Object> parameters)
Submits a Gremlin script with bound parameters asynchronously.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:
- a future that completes with the results when the request write is complete
-
submitAsync
CompletableFuture<ResultSet> submitAsync(String gremlin, RequestOptions options)
Submits a Gremlin script with request options asynchronously.- Parameters:
gremlin- the Gremlin script to executeoptions- the options to supply for this request- Returns:
- a future that completes with the results when the request write is complete
-
-