本文整理汇总了Java中com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration.getConfiguration方法的典型用法代码示例。如果您正苦于以下问题:Java GraphDatabaseConfiguration.getConfiguration方法的具体用法?Java GraphDatabaseConfiguration.getConfiguration怎么用?Java GraphDatabaseConfiguration.getConfiguration使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration
的用法示例。
在下文中一共展示了GraphDatabaseConfiguration.getConfiguration方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: StandardTransactionBuilder
import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration; //导入方法依赖的package包/类
/**
* 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();
}
}
示例2: StandardTransactionBuilder
import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration; //导入方法依赖的package包/类
/**
* 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();
// KAFKA PRODUCER
boolean logAll = graphConfig.getLogAllTransactions();
if (logAll)
this.logIdentifier = graphConfig.getAllLogTransactionName();
else
this.logIdentifier = null;
this.propertyPrefetching = graphConfig.hasPropertyPrefetching();
this.writableCustomOptions = GraphDatabaseConfiguration.buildGraphConfiguration();
this.customOptions = new MergedConfiguration(writableCustomOptions, graphConfig.getConfiguration());
vertexCacheSize(graphConfig.getTxVertexCacheSize());
dirtyVertexSize(graphConfig.getTxDirtyVertexSize());
}
示例3: StandardTransactionBuilder
import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration; //导入方法依赖的package包/类
/**
* 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.logIdentifier = null;
this.propertyPrefetching = graphConfig.hasPropertyPrefetching();
this.writableCustomOptions = GraphDatabaseConfiguration.buildConfiguration();
this.customOptions = new MergedConfiguration(writableCustomOptions, graphConfig.getConfiguration());
setVertexCacheSize(graphConfig.getTxVertexCacheSize());
setDirtyVertexSize(graphConfig.getTxDirtyVertexSize());
}
示例4: StandardTitanGraph
import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration; //导入方法依赖的package包/类
public StandardTitanGraph(GraphDatabaseConfiguration configuration) {
this.config = configuration;
this.backend = configuration.getBackend();
this.idAssigner = config.getIDAssigner(backend);
this.idManager = idAssigner.getIDManager();
this.serializer = config.getSerializer();
StoreFeatures storeFeatures = backend.getStoreFeatures();
this.indexSerializer = new IndexSerializer(configuration.getConfiguration(), this.serializer,
this.backend.getIndexInformation(), storeFeatures.isDistributed() && storeFeatures.isKeyOrdered());
this.edgeSerializer = new EdgeSerializer(this.serializer);
this.vertexExistenceQuery = edgeSerializer.getQuery(BaseKey.VertexExists, Direction.OUT, new EdgeSerializer.TypedInterval[0]).setLimit(1);
this.queryCache = new RelationQueryCache(this.edgeSerializer);
this.schemaCache = configuration.getTypeCache(typeCacheRetrieval);
this.times = configuration.getTimestampProvider();
isOpen = true;
txCounter = new AtomicLong(0);
openTransactions = Collections.newSetFromMap(new ConcurrentHashMap<StandardTitanTx, Boolean>(100, 0.75f, 1));
//Register instance and ensure uniqueness
String uniqueInstanceId = configuration.getUniqueGraphId();
ModifiableConfiguration globalConfig = GraphDatabaseConfiguration.getGlobalSystemConfig(backend);
if (globalConfig.has(REGISTRATION_TIME, uniqueInstanceId)) {
throw new TitanException(String.format("A Titan graph with the same instance id [%s] is already open. Might required forced shutdown.", uniqueInstanceId));
}
globalConfig.set(REGISTRATION_TIME, times.getTime(), uniqueInstanceId);
Log mgmtLog = backend.getSystemMgmtLog();
mgmtLogger = new ManagementLogger(this, mgmtLog, schemaCache, this.times);
mgmtLog.registerReader(ReadMarker.fromNow(), mgmtLogger);
shutdownHook = new ShutdownThread(this);
Runtime.getRuntime().addShutdownHook(shutdownHook);
log.debug("Installed shutdown hook {}", shutdownHook, new Throwable("Hook creation trace"));
}
示例5: StandardTitanGraph
import com.thinkaurelius.titan.graphdb.configuration.GraphDatabaseConfiguration; //导入方法依赖的package包/类
public StandardTitanGraph(GraphDatabaseConfiguration configuration) {
this.config = configuration;
this.backend = configuration.getBackend();
this.idAssigner = config.getIDAssigner(backend);
this.idManager = idAssigner.getIDManager();
this.serializer = config.getSerializer();
StoreFeatures storeFeatures = backend.getStoreFeatures();
this.indexSerializer = new IndexSerializer(configuration.getConfiguration(), this.serializer,
this.backend.getIndexInformation(),storeFeatures.isDistributed() && storeFeatures.isKeyOrdered());
this.edgeSerializer = new EdgeSerializer(this.serializer);
this.vertexExistenceQuery = edgeSerializer.getQuery(BaseKey.VertexExists, Direction.OUT, new EdgeSerializer.TypedInterval[0]).setLimit(1);
this.queryCache = new RelationQueryCache(this.edgeSerializer);
this.schemaCache = configuration.getTypeCache(typeCacheRetrieval);
this.times = configuration.getTimestampProvider();
isOpen = true;
txCounter = new AtomicLong(0);
openTransactions = Collections.newSetFromMap(new ConcurrentHashMap<StandardTitanTx, Boolean>(100,0.75f,1));
//Register instance and ensure uniqueness
String uniqueInstanceId = configuration.getUniqueGraphId();
ModifiableConfiguration globalConfig = GraphDatabaseConfiguration.getGlobalSystemConfig(backend);
if (globalConfig.has(REGISTRATION_TIME,uniqueInstanceId)) {
throw new TitanException(String.format("A Titan graph with the same instance id [%s] is already open. Might required forced shutdown.",uniqueInstanceId));
}
globalConfig.set(REGISTRATION_TIME, times.getTime(), uniqueInstanceId);
Log mgmtLog = backend.getSystemMgmtLog();
mgmtLogger = new ManagementLogger(this,mgmtLog,schemaCache,this.times);
mgmtLog.registerReader(ReadMarker.fromNow(),mgmtLogger);
shutdownHook = new ShutdownThread(this);
Runtime.getRuntime().addShutdownHook(shutdownHook);
}