예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void verboseFactoryCreateVerboseTracer()
        public virtual void VerboseFactoryCreateVerboseTracer()
        {
            BufferingLog    msgLog          = new BufferingLog();
            PageCacheTracer pageCacheTracer = TracerFactory().createPageCacheTracer(new Monitors(), new OnDemandJobScheduler(), Clocks.nanoClock(), msgLog);

            pageCacheTracer.BeginCacheFlush();
            assertEquals("Start whole page cache flush.", msgLog.ToString().Trim());
        }
예제 #2
0
 public DefaultTransactionTracer(Monitor monitor, JobScheduler jobScheduler) : this(Clocks.nanoClock(), monitor, jobScheduler)
 {
     if (!InstanceFieldsInitialized)
     {
         InitializeInstanceFields();
         InstanceFieldsInitialized = true;
     }
 }
예제 #3
0
        private static Instances KernelTransactionWithInternals(LoginContext loginContext)
        {
            TransactionHeaderInformation        headerInformation        = new TransactionHeaderInformation(-1, -1, new sbyte[0]);
            TransactionHeaderInformationFactory headerInformationFactory = mock(typeof(TransactionHeaderInformationFactory));

            when(headerInformationFactory.Create()).thenReturn(headerInformation);

            StorageEngine storageEngine = mock(typeof(StorageEngine));
            StorageReader storageReader = mock(typeof(StorageReader));

            when(storageEngine.NewReader()).thenReturn(storageReader);

            KernelTransactionImplementation transaction = new KernelTransactionImplementation(Config.defaults(), mock(typeof(StatementOperationParts)), mock(typeof(SchemaWriteGuard)), new TransactionHooks(), mock(typeof(ConstraintIndexCreator)), new Procedures(), headerInformationFactory, mock(typeof(TransactionRepresentationCommitProcess)), mock(typeof(TransactionMonitor)), mock(typeof(AuxiliaryTransactionStateManager)), mock(typeof(Pool)), Clocks.nanoClock(), new AtomicReference <CpuClock>(CpuClock.NOT_AVAILABLE), new AtomicReference <HeapAllocation>(HeapAllocation.NOT_AVAILABLE), NULL, LockTracer.NONE, Org.Neo4j.Io.pagecache.tracing.cursor.PageCursorTracerSupplier_Fields.Null, storageEngine, new CanWrite(), AutoIndexing.UNSUPPORTED, mock(typeof(ExplicitIndexStore)), EmptyVersionContextSupplier.EMPTY, ON_HEAP, new StandardConstraintSemantics(), mock(typeof(SchemaState)), mock(typeof(IndexingService)), mockedTokenHolders(), new Dependencies());

            StatementLocks statementLocks = new SimpleStatementLocks(new NoOpClient());

            transaction.Initialize(0, 0, statementLocks, KernelTransaction.Type.@implicit, loginContext.Authorize(s => - 1, GraphDatabaseSettings.DEFAULT_DATABASE_NAME), 0L, 1L);

            return(new Instances(transaction));
        }
예제 #4
0
 public DefaultCheckPointerTracer(Monitor monitor, JobScheduler jobScheduler) : this(Clocks.nanoClock(), monitor, jobScheduler)
 {
 }