internal TimeCheckPointThreshold(long thresholdMillis, SystemNanoClock clock) : base("time threshold") { this._timeMillisThreshold = thresholdMillis; this._clock = clock; // The random start offset means database in a cluster will not all check-point at the same time. long randomStartOffset = thresholdMillis > 0 ? ThreadLocalRandom.current().nextLong(thresholdMillis) : 0; this._lastCheckPointTimeNanos = clock.Nanos() + TimeUnit.MILLISECONDS.toNanos(randomStartOffset); }
public DefaultTransactionTracer(SystemNanoClock clock, Monitor monitor, JobScheduler jobScheduler) { if (!InstanceFieldsInitialized) { InitializeInstanceFields(); InstanceFieldsInitialized = true; } this._clock = clock; this._monitor = monitor; this._jobScheduler = jobScheduler; }
public override CheckPointThreshold CreateThreshold(Config config, SystemNanoClock clock, LogPruning logPruning, LogProvider logProvider) { int txThreshold = config.Get(GraphDatabaseSettings.check_point_interval_tx); //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final CountCommittedTransactionThreshold countCommittedTransactionThreshold = new CountCommittedTransactionThreshold(txThreshold); CountCommittedTransactionThreshold countCommittedTransactionThreshold = new CountCommittedTransactionThreshold(txThreshold); long timeMillisThreshold = config.Get(GraphDatabaseSettings.check_point_interval_time).toMillis(); TimeCheckPointThreshold timeCheckPointThreshold = new TimeCheckPointThreshold(timeMillisThreshold, clock); return(or(countCommittedTransactionThreshold, timeCheckPointThreshold)); }
public TransactionExecutionStatistic(KernelTransactionImplementation tx, SystemNanoClock clock, long startTimeMillis) { long nowMillis = clock.Millis(); long nowNanos = clock.Nanos(); KernelTransactionImplementation.Statistics statistics = tx.GetStatistics(); this._waitTimeMillis = NANOSECONDS.toMillis(statistics.GetWaitingTimeNanos(nowNanos)); this._heapAllocatedBytes = NullIfNegative(statistics.HeapAllocatedBytes()); this._directAllocatedBytes = NullIfNegative(statistics.DirectAllocatedBytes()); this._cpuTimeMillis = NullIfNegative(statistics.CpuTimeMillis()); this._pageFaults = statistics.TotalTransactionPageCacheFaults(); this._pageHits = statistics.TotalTransactionPageCacheHits(); this._elapsedTimeMillis = nowMillis - startTimeMillis; this._idleTimeMillis = this._cpuTimeMillis != null ? _elapsedTimeMillis - this._cpuTimeMillis - _waitTimeMillis : null; }
internal VerbosePageCacheTracer(Log log, SystemNanoClock clock) { this._log = log; this._clock = clock; }
public CallTrackingClock(SystemNanoClock actual) { this._actual = actual; }
public override CheckPointThreshold CreateThreshold(Config config, SystemNanoClock clock, LogPruning logPruning, LogProvider logProvider) { return(new VolumetricCheckPointThreshold(logPruning)); }
public TestGraphDatabaseFactoryState(TestGraphDatabaseFactoryState previous) : base(previous) { _fileSystem = previous._fileSystem; _internalLogProvider = previous._internalLogProvider; _clock = previous._clock; }
public override PageCacheTracer CreatePageCacheTracer(Monitors monitors, JobScheduler jobScheduler, SystemNanoClock clock, Log log) { return(new DefaultPageCacheTracer()); }
public override PageCacheTracer CreatePageCacheTracer(Monitors monitors, JobScheduler jobScheduler, SystemNanoClock clock, Log msgLog) { return(new VerbosePageCacheTracer(msgLog, clock)); }
public override DatabaseAvailabilityGuard CreateDatabaseAvailabilityGuard(SystemNanoClock clock, LogService logService, Config config) { return(_editionModule.createDatabaseAvailabilityGuard(_databaseName, clock, logService, config)); }
/// <summary> /// Create a <seealso cref="CheckPointThreshold"/> instance based on this policy and the given configurations. /// </summary> public abstract CheckPointThreshold CreateThreshold(Config config, SystemNanoClock clock, LogPruning logPruning, LogProvider logProvider);
public override CheckPointThreshold CreateThreshold(Config config, SystemNanoClock clock, LogPruning logPruning, LogProvider logProvider) { return(new ContinuousCheckPointThreshold()); }
public abstract CheckPointThreshold CreateThreshold(Org.Neo4j.Kernel.configuration.Config config, Org.Neo4j.Time.SystemNanoClock clock, Org.Neo4j.Kernel.impl.transaction.log.pruning.LogPruning logPruning, Org.Neo4j.Logging.LogProvider logProvider);
public DefaultCheckPointerTracer(SystemNanoClock clock, Monitor monitor, JobScheduler jobScheduler) { this._clock = clock; this._monitor = monitor; this._jobScheduler = jobScheduler; }
public RotationTimerFactory(SystemNanoClock clock, long timeoutMillis) { this._clock = clock; this._timeoutMillis = timeoutMillis; }