com.thinkaurelius.titan.core

## Class TitanFactory

- java.lang.Object
- - com.thinkaurelius.titan.core.TitanFactory

-     public class TitanFactory
      extends Object

  TitanFactory is used to open or instantiate a Titan graph database.
  Author:
    Matthias Bröcheler (http://www.matthiasb.com)
  See Also:
    `TitanGraph`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TitanFactory.Builder`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TitanFactory()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static TitanFactory.Builder` | `build()` Returns a `TitanFactory.Builder` that allows to set the configuration options for opening a Titan graph database.
    `static TitanGraph` | `open(BasicConfiguration configuration)` Opens a `TitanGraph` database configured according to the provided configuration.
    `static TitanGraph` | `open(org.apache.commons.configuration.Configuration configuration)` Opens a `TitanGraph` database configured according to the provided configuration.
    `static TitanGraph` | `open(ReadConfiguration configuration)` Opens a `TitanGraph` database configured according to the provided configuration.
    `static TitanGraph` | `open(String shortcutOrFile)` Opens a `TitanGraph` database.
    `static LogProcessorFramework` | `openTransactionLog(TitanGraph graph)` Returns a `LogProcessorFramework` for processing transaction log entries against the provided graph instance.
    `static TransactionRecovery` | `startTransactionRecovery(TitanGraph graph, long sinceEpoch, TimeUnit unit)` Returns a `TransactionRecovery` process for recovering partially failed transactions.

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

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

- - ### Constructor Detail

    - #### TitanFactory

          public TitanFactory()

  - ### Method Detail

    - #### open

          public static TitanGraph open(String shortcutOrFile)

      Opens a `TitanGraph` database.

      If the argument points to a configuration file, the configuration file is loaded to configure the Titan graph If the string argument is a configuration short-cut, then the short-cut is parsed and used to configure the returned Titan graph.

      A configuration short-cut is of the form: [STORAGE_BACKEND_NAME]:[DIRECTORY_OR_HOST]
      Parameters:
        `shortcutOrFile` - Configuration file name or configuration short-cut
      Returns:
        Titan graph database configured according to the provided configuration
      See Also:
        Graph Configuration Wiki

    - #### open

          public static TitanGraph open(org.apache.commons.configuration.Configuration configuration)

      Opens a `TitanGraph` database configured according to the provided configuration.
      Parameters:
        `configuration` - Configuration for the graph database
      Returns:
        Titan graph database
      See Also:
        Graph Configuration Wiki

    - #### open

          public static TitanGraph open(BasicConfiguration configuration)

      Opens a `TitanGraph` database configured according to the provided configuration.
      Parameters:
        `configuration` - Configuration for the graph database
      Returns:
        Titan graph database

    - #### open

          public static TitanGraph open(ReadConfiguration configuration)

      Opens a `TitanGraph` database configured according to the provided configuration.
      Parameters:
        `configuration` - Configuration for the graph database
      Returns:
        Titan graph database

    - #### build

          public static TitanFactory.Builder build()

      Returns a `TitanFactory.Builder` that allows to set the configuration options for opening a Titan graph database.

      In the builder, the configuration options for the graph can be set individually. Once all options are configured, the graph can be opened with `TitanFactory.Builder.open()`.
      Returns:

    - #### openTransactionLog

          public static LogProcessorFramework openTransactionLog(TitanGraph graph)

      Returns a `LogProcessorFramework` for processing transaction log entries against the provided graph instance.
      Parameters:
        `graph` -
      Returns:

    - #### startTransactionRecovery

          public static TransactionRecovery startTransactionRecovery(TitanGraph graph,
                                                     long sinceEpoch,
                                                     TimeUnit unit)

      Returns a `TransactionRecovery` process for recovering partially failed transactions. The recovery process will start processing the write-ahead transaction log at the specified transaction time.
      Parameters:
        `graph` -
        `sinceEpoch` -
        `unit` -
      Returns:

Copyright © 2012–2014. All rights reserved.