Пример #1
0
        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);
        }
Пример #2
0
 public DefaultTransactionTracer(SystemNanoClock clock, Monitor monitor, JobScheduler jobScheduler)
 {
     if (!InstanceFieldsInitialized)
     {
         InitializeInstanceFields();
         InstanceFieldsInitialized = true;
     }
     this._clock        = clock;
     this._monitor      = monitor;
     this._jobScheduler = jobScheduler;
 }
Пример #3
0
        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));
        }
Пример #4
0
        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;
        }
Пример #5
0
 internal VerbosePageCacheTracer(Log log, SystemNanoClock clock)
 {
     this._log   = log;
     this._clock = clock;
 }
Пример #6
0
 public CallTrackingClock(SystemNanoClock actual)
 {
     this._actual = actual;
 }
Пример #7
0
 public override CheckPointThreshold CreateThreshold(Config config, SystemNanoClock clock, LogPruning logPruning, LogProvider logProvider)
 {
     return(new VolumetricCheckPointThreshold(logPruning));
 }
Пример #8
0
 public TestGraphDatabaseFactoryState(TestGraphDatabaseFactoryState previous) : base(previous)
 {
     _fileSystem          = previous._fileSystem;
     _internalLogProvider = previous._internalLogProvider;
     _clock = previous._clock;
 }
Пример #9
0
 public override PageCacheTracer CreatePageCacheTracer(Monitors monitors, JobScheduler jobScheduler, SystemNanoClock clock, Log log)
 {
     return(new DefaultPageCacheTracer());
 }
Пример #10
0
 public override PageCacheTracer CreatePageCacheTracer(Monitors monitors, JobScheduler jobScheduler, SystemNanoClock clock, Log msgLog)
 {
     return(new VerbosePageCacheTracer(msgLog, clock));
 }
Пример #11
0
 public override DatabaseAvailabilityGuard CreateDatabaseAvailabilityGuard(SystemNanoClock clock, LogService logService, Config config)
 {
     return(_editionModule.createDatabaseAvailabilityGuard(_databaseName, clock, logService, config));
 }
Пример #12
0
 /// <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);
Пример #13
0
 public override CheckPointThreshold CreateThreshold(Config config, SystemNanoClock clock, LogPruning logPruning, LogProvider logProvider)
 {
     return(new ContinuousCheckPointThreshold());
 }
Пример #14
0
 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);
Пример #15
0
 public DefaultCheckPointerTracer(SystemNanoClock clock, Monitor monitor, JobScheduler jobScheduler)
 {
     this._clock        = clock;
     this._monitor      = monitor;
     this._jobScheduler = jobScheduler;
 }
Пример #16
0
 public RotationTimerFactory(SystemNanoClock clock, long timeoutMillis)
 {
     this._clock         = clock;
     this._timeoutMillis = timeoutMillis;
 }