com.thinkaurelius.titan.core.olap

## Interface OLAPJobBuilder<S>

- All Known Implementing Classes:
    FulgoraBuilder

      public interface OLAPJobBuilder<S>

  Builder to define and configure an `OLAPJob` for execution.
  Author:
    Matthias Broecheler (me@matthiasb.com)

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `OLAPQueryBuilder<S,?,?>` | `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`.
    `OLAPJobBuilder<S>` | `setInitializer(StateInitializer<S> initial)` Sets an `StateInitializer` function to initialize the vertex state on demand.
    `OLAPJobBuilder<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.
    `OLAPJobBuilder<S>` | `setJob(OLAPJob<S> job)` Configures the `OLAPJob` vertex-centric program to execute on all vertices.
    `OLAPJobBuilder<S>` | `setNumProcessingThreads(int numThreads)` Configure the number of threads to execute the configured `OLAPJob`.
    `OLAPJobBuilder<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.
    `OLAPJobBuilder<S>` | `setStateKey(String stateKey)` Defines the name of the key to be used as the dedicated "state" key.

- - ### Method Detail

    - #### setJob

          OLAPJobBuilder<S> setJob(OLAPJob<S> job)

      Configures the `OLAPJob` vertex-centric program to execute on all vertices.
      Parameters:
        `job` -
      Returns:

    - #### setStateKey

          OLAPJobBuilder<S> setStateKey(String stateKey)

      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.
      Parameters:
        `stateKey` -
      Returns:

    - #### setInitializer

          OLAPJobBuilder<S> setInitializer(StateInitializer<S> initial)

      Sets an `StateInitializer` function to initialize the vertex state on demand.
      Parameters:
        `initial` -
      Returns:

    - #### setInitialState

          OLAPJobBuilder<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.
      Parameters:
        `values` -
      Returns:

    - #### setInitialState

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

      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.
      Parameters:
        `values` -
      Returns:

    - #### setNumVertices

          OLAPJobBuilder<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. Setting is value is optional and does not impact correctness. Providing the exact number of vertices might make execution faster.
      Parameters:
        `numVertices` -
      Returns:

    - #### setNumProcessingThreads

          OLAPJobBuilder<S> setNumProcessingThreads(int numThreads)

      Configure the number of threads to execute the configured `OLAPJob`.
      Parameters:
        `numThreads` -
      Returns:

    - #### addQuery

          OLAPQueryBuilder<S,?,?> addQuery()

      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.
      Returns:

    - #### execute

          Future<OLAPResult<S>> execute()

      Starts the execution of this job and returns the computed vertex states as a `OLAPResult`.
      Returns:

Copyright © 2012–2014. All rights reserved.