@Override public Configuration restrictTo(String... umbrellaElements) { return new MergedConfiguration(first.restrictTo(umbrellaElements), second.restrictTo(umbrellaElements)); } }
scanConfig = null == scanConfig ? graphConfiguration : new MergedConfiguration(graphConfiguration, scanConfig);
@Override public ExpectedValueCheckingTransaction beginTransaction(BaseTransactionConfig configuration) throws BackendException { // Get a transaction without any guarantees about strong consistency StoreTransaction inconsistentTx = manager.beginTransaction(configuration); // Get a transaction that provides global strong consistency Configuration customOptions = new MergedConfiguration(storeFeatures.getKeyConsistentTxConfig(), configuration.getCustomOptions()); BaseTransactionConfig consistentTxCfg = new StandardBaseTransactionConfig.Builder(configuration) .customOptions(customOptions).build(); StoreTransaction strongConsistentTx = manager.beginTransaction(consistentTxCfg); // Return a wrapper around both the inconsistent and consistent store transactions return new ExpectedValueCheckingTransaction(inconsistentTx, strongConsistentTx, maxReadTime); }
/** * Constructs a new JanusGraphTransaction configuration with default configuration parameters. */ public StandardTransactionBuilder(GraphDatabaseConfiguration graphConfig, StandardJanusGraph graph) { Preconditions.checkNotNull(graphConfig); Preconditions.checkNotNull(graph); if (graphConfig.isReadOnly()) readOnly(); if (graphConfig.isBatchLoading()) enableBatchLoading(); this.graph = graph; this.defaultSchemaMaker = graphConfig.getDefaultSchemaMaker(); this.hasDisabledSchemaConstraints = graphConfig.hasDisabledSchemaConstraints(); this.assignIDsImmediately = graphConfig.hasFlushIDs(); this.forceIndexUsage = graphConfig.hasForceIndexUsage(); this.groupName = graphConfig.getMetricsPrefix(); this.logIdentifier = null; this.propertyPrefetching = graphConfig.hasPropertyPrefetching(); this.writableCustomOptions = GraphDatabaseConfiguration.buildGraphConfiguration(); this.customOptions = new MergedConfiguration(writableCustomOptions, graphConfig.getConfiguration()); vertexCacheSize(graphConfig.getTxVertexCacheSize()); dirtyVertexSize(graphConfig.getTxDirtyVertexSize()); }
overwrite.set(KCVSLogManager.LOG_FIXED_PARTITION,true,MANAGEMENT_LOG); this.configuration = new MergedConfiguration(overwrite,combinedConfig); preLoadConfiguration();