com.thinkaurelius.titan.graphdb.fulgora

## Class FulgoraBuilder<S>

- java.lang.Object
- - com.thinkaurelius.titan.graphdb.fulgora.FulgoraBuilder<S>

- All Implemented Interfaces:
    OLAPJobBuilder<S>

      public class FulgoraBuilder<S>
      extends Object
      implements OLAPJobBuilder<S>

  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `DEFAULT_HARD_QUERY_LIMIT`
    `static String` | `STATE_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FulgoraBuilder(StandardTitanGraph graph)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `OLAPQueryBuilder` | `addQuery()` Adds a new vertex query to this job.
    `Future<OLAPResult<S>>` | `execute()` Starts the execution of this job and returns the computed vertex states as a `OLAPResult`.
    `FulgoraBuilder<S>` | `setCustomTxOptions(String key, Object value)`
    `FulgoraBuilder<S>` | `setInitializer(StateInitializer<S> initial)` Sets an `StateInitializer` function to initialize the vertex state on demand.
    `FulgoraBuilder<S>` | `setInitialState(Map<Long,S> values)` Set the initial state of the vertices where the key is the vertex id and the value is the state of the vertex.
    `OLAPJobBuilder<S>` | `setInitialState(OLAPResult<S> values)` Sets the initial state of the vertices to the result from a previous OLAP computation.
    `FulgoraBuilder<S>` | `setJob(OLAPJob job)` Configures the `OLAPJob` vertex-centric program to execute on all vertices.
    `FulgoraBuilder<S>` | `setNumProcessingThreads(int numThreads)` Configure the number of threads to execute the configured `OLAPJob`.
    `FulgoraBuilder<S>` | `setNumVertices(long numVertices)` If the exact number of vertices to be processed is know a priori, it can be specified via this method to make memory allocation more efficient.
    `FulgoraBuilder<S>` | `setStateKey(String stateKey)` Defines the name of the key to be used as the dedicated "state" key.

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

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

- - ### Field Detail

    - #### STATE_KEY

          public static final String STATE_KEY

      See Also:
        Constant Field Values

    - #### DEFAULT_HARD_QUERY_LIMIT

          public static final int DEFAULT_HARD_QUERY_LIMIT

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FulgoraBuilder

          public FulgoraBuilder(StandardTitanGraph graph)

  - ### Method Detail

    - #### setJob

          public FulgoraBuilder<S> setJob(OLAPJob job)

      Description copied from interface: `OLAPJobBuilder`
      Configures the `OLAPJob` vertex-centric program to execute on all vertices.
      Specified by:
        `setJob` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setStateKey

          public FulgoraBuilder<S> setStateKey(String stateKey)

      Description copied from interface: `OLAPJobBuilder`
      Defines the name of the key to be used as the dedicated "state" key. Retrieving the property value for this key on any given vertex in an `OLAPJob` will return the current vertex state.
      Specified by:
        `setStateKey` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setInitializer

          public FulgoraBuilder<S> setInitializer(StateInitializer<S> initial)

      Description copied from interface: `OLAPJobBuilder`
      Sets an `StateInitializer` function to initialize the vertex state on demand.
      Specified by:
        `setInitializer` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setInitialState

          public FulgoraBuilder<S> setInitialState(Map<Long,S> values)

      Description copied from interface: `OLAPJobBuilder`
      Set the initial state of the vertices where the key is the vertex id and the value is the state of the vertex.
      Specified by:
        `setInitialState` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setInitialState

          public OLAPJobBuilder<S> setInitialState(OLAPResult<S> values)

      Description copied from interface: `OLAPJobBuilder`
      Sets the initial state of the vertices to the result from a previous OLAP computation.

      Note, that the data structures underlying the `OLAPResult` may be removed to be memory efficient which means that the previous state can be overwritten and is therefore lost.
      Specified by:
        `setInitialState` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setNumVertices

          public FulgoraBuilder<S> setNumVertices(long numVertices)

      Description copied from interface: `OLAPJobBuilder`
      If the exact number of vertices to be processed is know a priori, it can be specified via this method to make memory allocation more efficient. Setting is value is optional and does not impact correctness. Providing the exact number of vertices might make execution faster.
      Specified by:
        `setNumVertices` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setNumProcessingThreads

          public FulgoraBuilder<S> setNumProcessingThreads(int numThreads)

      Description copied from interface: `OLAPJobBuilder`
      Configure the number of threads to execute the configured `OLAPJob`.
      Specified by:
        `setNumProcessingThreads` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### setCustomTxOptions

          public FulgoraBuilder<S> setCustomTxOptions(String key,
                                             Object value)

    - #### addQuery

          public OLAPQueryBuilder addQuery()

      Description copied from interface: `OLAPJobBuilder`
      Adds a new vertex query to this job. The vertex queries specify which edges and properties will be accessible when the configured `OLAPJob` executes. Only the data that can be retrieved through previously configured queries will be accessible during execution.
      Specified by:
        `addQuery` in interface `OLAPJobBuilder<S>`
      Returns:

    - #### execute

          public Future<OLAPResult<S>> execute()

      Description copied from interface: `OLAPJobBuilder`
      Starts the execution of this job and returns the computed vertex states as a `OLAPResult`.
      Specified by:
        `execute` in interface `OLAPJobBuilder<S>`
      Returns:

Copyright © 2012–2014. All rights reserved.