org.apache.tinkerpop.gremlin.driver.remote

## Class DriverRemoteTraversal<S,E>

- java.lang.Object
- - org.apache.tinkerpop.gremlin.process.remote.traversal.AbstractRemoteTraversal<S,E>
  - - org.apache.tinkerpop.gremlin.driver.remote.DriverRemoteTraversal<S,E>

- All Implemented Interfaces:
    Serializable, AutoCloseable, Cloneable, Iterator<E>, RemoteTraversal<S,E>, Traversal<S,E>, Traversal.Admin<S,E>

      public class DriverRemoteTraversal<S,E>
      extends AbstractRemoteTraversal<S,E>

  A `AbstractRemoteTraversal` implementation for the Gremlin Driver. This `Traversal` implementation is typically iterated from `RemoteStep` where the `nextTraverser()` method is called. While this class provides implementations for both `next()` and `hasNext()` that unroll "bulked" results, those methods are not called directly from with TinkerPop remoting.
  Author:
    Stephen Mallette (http://stephen.genoprime.com)
  See Also:
    Serialized Form

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal

      `Traversal.Admin<S,E>, Traversal.Exceptions, Traversal.Symbols`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DriverRemoteTraversal(ResultSet rs, Client client, boolean attach, Optional<Configuration> conf)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` Releases server-side resources related to this traversal (i.e.
    `RemoteTraversalSideEffects` | `getSideEffects()` Deprecated. as of release 3.3.8, not directly replaced, see `Admin#getSideEffects()` for more information, but further note that this method is not being removed, but will not be functional for remote execution. Prefer `GraphTraversal.cap(String, String...)` to get side-effects as part of traversal iteration.
    `boolean` | `hasNext()`
    `E` | `next()`
    `Traverser.Admin<E>` | `nextTraverser()` Note that internally `#nextTraverser()` is called from within a loop (specifically in `AbstractStep.next()` that breaks properly when a `NoSuchElementException` is thrown.

    - ### Methods inherited from class org.apache.tinkerpop.gremlin.process.remote.traversal.AbstractRemoteTraversal

      `addStep, applyStrategies, clone, getBytecode, getGraph, getParent, getSteps, getStrategies, getTraverserGenerator, getTraverserRequirements, isLocked, removeStep, setGraph, setParent, setSideEffects, setStrategies`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal.Admin

      `addStart, addStarts, addStep, equals, getEndStep, getStartStep, getTraversalSource, getTraverserSetSupplier, removeStep, reset`

    - ### Methods inherited from interface org.apache.tinkerpop.gremlin.process.traversal.Traversal

      `asAdmin, explain, fill, forEachRemaining, forEachRemaining, iterate, next, none, notifyClose, profile, promise, toBulkSet, toList, toSet, toStream, tryNext`

    - ### Methods inherited from interface java.util.Iterator

      `remove`

- - ### Constructor Detail

    - #### DriverRemoteTraversal

          public DriverRemoteTraversal(ResultSet rs,
                                       Client client,
                                       boolean attach,
                                       Optional<Configuration> conf)

  - ### Method Detail

    - #### getSideEffects

          @Deprecated
          public RemoteTraversalSideEffects getSideEffects()

      Deprecated. as of release 3.3.8, not directly replaced, see `Admin#getSideEffects()` for more information, but further note that this method is not being removed, but will not be functional for remote execution. Prefer `GraphTraversal.cap(String, String...)` to get side-effects as part of traversal iteration.
      Gets a side-effect from the server. Do not call this method prior to completing the iteration of the `DriverRemoteTraversal` that spawned this as the side-effect will not be ready. Generally speaking, the common user would not get side-effects this way - they would use a call to `cap()`.
      Returns:
        The traversal sideEffects

    - #### hasNext

          public boolean hasNext()

    - #### next

          public E next()

    - #### nextTraverser

          public Traverser.Admin<E> nextTraverser()

      Description copied from class: `AbstractRemoteTraversal`
      Note that internally `#nextTraverser()` is called from within a loop (specifically in `AbstractStep.next()` that breaks properly when a `NoSuchElementException` is thrown. In other words the "results" should be iterated to force that failure.
      Specified by:
        `nextTraverser` in interface `Traversal.Admin<S,E>`
      Specified by:
        `nextTraverser` in class `AbstractRemoteTraversal<S,E>`

    - #### close

          public void close()
                     throws Exception

      Releases server-side resources related to this traversal (i.e. clearing the side-effect cache of data related to this traversal.
      Throws:
        `Exception`

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.