public final class Neo4jConfigBasedRuntimeConfiguration extends BaseRuntimeConfiguration
RuntimeConfiguration that loads bespoke settings from Neo4j's configuration properties, falling
back to default values when overrides aren't available. Intended for internal framework use, mainly for server deployments.
There are three main things configured using this mechanism: the TimingStrategy, the DatabaseWriterType, and the StatsCollector.
For TimingStrategy, there are two choices. The first one is AdaptiveTimingStrategy, configured by using the following settings
com.graphaware.runtime.timing.strategy=adaptive
com.graphaware.runtime.timing.delay=2000
com.graphaware.runtime.timing.maxDelay=5000
com.graphaware.runtime.timing.minDelay=5
com.graphaware.runtime.timing.busyThreshold=100
com.graphaware.runtime.timing.maxSamples=200
com.graphaware.runtime.timing.maxTime=2000*
The above are also the default values, if no configuration is provided. For exact meaning of the values, please refer
to the Javadoc of AdaptiveTimingStrategy.
The other option is FixedDelayTimingStrategy, configured by using the following settings
com.graphaware.runtime.timing.strategy=fixed
com.graphaware.runtime.timing.delay=200
com.graphaware.runtime.timing.initialDelay=1000
For WritingConfig, there are three choices:
com.graphaware.runtime.db.writer=default
results in a DefaultWriter being constructed.
com.graphaware.runtime.db.writer=single
#optional queue size, defaults to 10,000
com.graphaware.runtime.db.writer.queueSize=10000
results in a TxPerTaskWriter being constructed with the configured queue size
com.graphaware.runtime.db.writer=batch
#optional queue size, defaults to 10,000
com.graphaware.runtime.db.writer.queueSize=10000
#optional batch size, defaults to 1,000
com.graphaware.runtime.db.writer.batchSize=1000
results in a BatchWriter being constructed with the configured queue and batch sizes.
For StatsCollector, GoogleAnalyticsStatsCollector is used by default. For disabling statistics reporting, use
com.graphaware.runtime.stats.disable=true
With this setting in place, NullStatsCollector will be used.GA_PREFIX, TIMER_MODULES_PROPERTY_PREFIX, TX_MODULES_PROPERTY_PREFIX| Constructor and Description |
|---|
Neo4jConfigBasedRuntimeConfiguration(org.neo4j.graphdb.GraphDatabaseService database,
org.neo4j.kernel.configuration.Config config)
Constructs a new
Neo4jConfigBasedRuntimeConfiguration based on the given Neo4j Config. |
createPrefix, equals, getStatsCollector, getTimingStrategy, getWritingConfig, hashCode, kernelConfigpublic Neo4jConfigBasedRuntimeConfiguration(org.neo4j.graphdb.GraphDatabaseService database,
org.neo4j.kernel.configuration.Config config)
Neo4jConfigBasedRuntimeConfiguration based on the given Neo4j Config.config - The Config containing the settings used to configure the runtimeCopyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.