public class JanusGraphFactory extends Object
JanusGraph| Modifier and Type | Class and Description |
|---|---|
static class |
JanusGraphFactory.Builder |
| Constructor and Description |
|---|
JanusGraphFactory() |
| Modifier and Type | Method and Description |
|---|---|
static JanusGraphFactory.Builder |
build()
Returns a
JanusGraphFactory.Builder that allows to set the configuration options for opening a JanusGraph graph database. |
static void |
close(org.apache.tinkerpop.gremlin.structure.Graph graph)
Removes
Graph from JanusGraphManager graph reference tracker, if exists
there. |
static void |
drop(JanusGraph graph)
Drop graph database, deleting all data in storage and indexing backends.
|
static Set<String> |
getGraphNames()
Return a Set of graph names stored in the
JanusGraphManager |
static JanusGraph |
open(BasicConfiguration configuration)
Opens a
JanusGraph database configured according to the provided configuration. |
static JanusGraph |
open(org.apache.commons.configuration2.Configuration configuration)
Opens a
JanusGraph database configured according to the provided configuration. |
static JanusGraph |
open(ReadConfiguration configuration)
Opens a
JanusGraph database configured according to the provided configuration. |
static JanusGraph |
open(ReadConfiguration configuration,
String backupName)
Opens a
JanusGraph database configured according to the provided configuration. |
static JanusGraph |
open(String shortcutOrFile)
Opens a
JanusGraph database. |
static JanusGraph |
open(String shortcutOrFile,
String backupName)
Opens a
JanusGraph database. |
static LogProcessorFramework |
openTransactionLog(JanusGraph graph)
Returns a
LogProcessorFramework for processing transaction log entries
against the provided graph instance. |
static TransactionRecovery |
startTransactionRecovery(JanusGraph graph,
Instant start)
Returns a
TransactionRecovery process for recovering partially failed transactions. |
public static JanusGraph open(String shortcutOrFile)
JanusGraph database.
If the argument points to a configuration file, the configuration file is loaded to configure the JanusGraph graph If the string argument is a configuration short-cut, then the short-cut is parsed and used to configure the returned JanusGraph graph.
A configuration short-cut is of the form: [STORAGE_BACKEND_NAME]:[DIRECTORY_OR_HOST]
shortcutOrFile - Configuration file name or configuration short-cutpublic static JanusGraph open(String shortcutOrFile, String backupName)
JanusGraph database.
If the argument points to a configuration file, the configuration file is loaded to configure the JanusGraph graph If the string argument is a configuration short-cut, then the short-cut is parsed and used to configure the returned JanusGraph graph. This method shouldn't be called by end users; it is used by internal server processes to open graphs defined at server start that do not include the graphname property.
A configuration short-cut is of the form: [STORAGE_BACKEND_NAME]:[DIRECTORY_OR_HOST]
shortcutOrFile - Configuration file name or configuration short-cutbackupName - Backup name for graphpublic static JanusGraph open(org.apache.commons.configuration2.Configuration configuration)
JanusGraph database configured according to the provided configuration.configuration - Configuration for the graph databasepublic static JanusGraph open(BasicConfiguration configuration)
JanusGraph database configured according to the provided configuration.configuration - Configuration for the graph databasepublic static JanusGraph open(ReadConfiguration configuration)
JanusGraph database configured according to the provided configuration.configuration - Configuration for the graph databasepublic static JanusGraph open(ReadConfiguration configuration, String backupName)
JanusGraph database configured according to the provided configuration.
This method shouldn't be called by end users; it is used by internal server processes to
open graphs defined at server start that do not include the graphname property.configuration - Configuration for the graph databasebackupName - Backup name for graphpublic static Set<String> getGraphNames()
JanusGraphManagerpublic static void close(org.apache.tinkerpop.gremlin.structure.Graph graph)
throws Exception
Graph from JanusGraphManager graph reference tracker, if exists
there.graph - GraphExceptionpublic static void drop(JanusGraph graph) throws BackendException
JanusGraphManager
graph reference tracker, if there.
WARNING: This is an irreversible operation that will delete all graph and index data.
graph - JanusGraph graph database. Can be open or closed.BackendException - If an error occurs during deletionpublic static JanusGraphFactory.Builder build()
JanusGraphFactory.Builder that allows to set the configuration options for opening a JanusGraph 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 JanusGraphFactory.Builder.open().
public static LogProcessorFramework openTransactionLog(JanusGraph graph)
LogProcessorFramework for processing transaction log entries
against the provided graph instance.graph - public static TransactionRecovery startTransactionRecovery(JanusGraph graph, Instant start)
TransactionRecovery process for recovering partially failed transactions. The recovery process
will start processing the write-ahead transaction log at the specified transaction time.graph - start - Copyright © 2012–2024. All rights reserved.