org.apache.tinkerpop.gremlin.tinkergraph.process.computer

## Class TinkerWorkerPool

- java.lang.Object
- - org.apache.tinkerpop.gremlin.tinkergraph.process.computer.TinkerWorkerPool

- All Implemented Interfaces:
    AutoCloseable

      public final class TinkerWorkerPool
      extends Object
      implements AutoCloseable

  Author:
    Marko A. Rodriguez (http://markorodriguez.com), Stephen Mallette (http://stephen.genoprime.com)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TinkerWorkerPool(TinkerGraph graph, TinkerMemory memory, int numberOfWorkers)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()`
    `void` | `closeNow()`
    `void` | `executeMapReduce(Consumer<MapReduce> worker)`
    `void` | `executeVertexProgram(TriConsumer<Iterator<Vertex>,VertexProgram,TinkerWorkerMemory> worker)`
    `void` | `setMapReduce(MapReduce mapReduce)`
    `void` | `setVertexProgram(VertexProgram vertexProgram)`

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

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

- - ### Constructor Detail

    - #### TinkerWorkerPool

          public TinkerWorkerPool(TinkerGraph graph,
                                  TinkerMemory memory,
                                  int numberOfWorkers)

  - ### Method Detail

    - #### setVertexProgram

          public void setVertexProgram(VertexProgram vertexProgram)

    - #### setMapReduce

          public void setMapReduce(MapReduce mapReduce)

    - #### executeVertexProgram

          public void executeVertexProgram(TriConsumer<Iterator<Vertex>,VertexProgram,TinkerWorkerMemory> worker)
                                    throws InterruptedException

      Throws:
        `InterruptedException`

    - #### executeMapReduce

          public void executeMapReduce(Consumer<MapReduce> worker)
                                throws InterruptedException

      Throws:
        `InterruptedException`

    - #### closeNow

          public void closeNow()
                        throws Exception

      Throws:
        `Exception`

    - #### close

          public void close()
                     throws Exception

      Specified by:
        `close` in interface `AutoCloseable`
      Throws:
        `Exception`

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