Java Code Examples for com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration#isReadOnly()

The following examples show how to use com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration#isReadOnly() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StandardTransactionBuilder.java    From titan1withtp3.1 with Apache License 2.0 6 votes vote down vote up
/**
 * Constructs a new TitanTransaction configuration with default configuration parameters.
 */
public StandardTransactionBuilder(GraphDatabaseConfiguration graphConfig, StandardTitanGraph graph) {
    Preconditions.checkNotNull(graphConfig);
    Preconditions.checkNotNull(graph);
    if (graphConfig.isReadOnly()) readOnly();
    if (graphConfig.isBatchLoading()) enableBatchLoading();
    this.graph = graph;
    this.defaultSchemaMaker = graphConfig.getDefaultSchemaMaker();
    this.assignIDsImmediately = graphConfig.hasFlushIDs();
    this.forceIndexUsage = graphConfig.hasForceIndexUsage();
    this.groupName = graphConfig.getMetricsPrefix();
    this.propertyPrefetching = graphConfig.hasPropertyPrefetching();
    this.writableCustomOptions = GraphDatabaseConfiguration.buildGraphConfiguration();
    this.customOptions = new MergedConfiguration(writableCustomOptions, graphConfig.getConfiguration());
    vertexCacheSize(graphConfig.getTxVertexCacheSize());
    dirtyVertexSize(graphConfig.getTxDirtyVertexSize());

    // KAFKA PRODUCER
    this.logIdentifier = null;
    boolean logAll = graphConfig.getLogAllTransactions();

    if (logAll) {
        this.logIdentifier = graphConfig.getAllLogTransactionName();
    }
}
 
Example 2
Source File: StandardTransactionBuilder.java    From titan1withtp3.1 with Apache License 2.0 6 votes vote down vote up
public StandardTransactionBuilder(GraphDatabaseConfiguration graphConfig, StandardTitanGraph graph, Configuration customOptions) {
    Preconditions.checkNotNull(graphConfig);
    Preconditions.checkNotNull(graph);
    if (graphConfig.isReadOnly()) readOnly();
    if (graphConfig.isBatchLoading()) enableBatchLoading();
    this.graph = graph;
    this.defaultSchemaMaker = graphConfig.getDefaultSchemaMaker();
    this.assignIDsImmediately = graphConfig.hasFlushIDs();
    this.forceIndexUsage = graphConfig.hasForceIndexUsage();
    this.groupName = graphConfig.getMetricsPrefix();
    this.propertyPrefetching = graphConfig.hasPropertyPrefetching();
    this.writableCustomOptions = null;
    this.customOptions = customOptions;
    vertexCacheSize(graphConfig.getTxVertexCacheSize());
    dirtyVertexSize(graphConfig.getTxDirtyVertexSize());


    // KAFKA PRODUCER
    this.logIdentifier = null;
    boolean logAll = graphConfig.getLogAllTransactions();

    if (logAll) {
        this.logIdentifier = graphConfig.getAllLogTransactionName();

    }
}