コード例 #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: StoreFileImpl(ManagementData management) throws javax.management.NotCompliantMBeanException
            internal StoreFileImpl(ManagementData management) : base(management)
            {
                Fs = management.KernelData.FilesystemAbstraction;

                DataSourceManager dataSourceManager = management.KernelData.DataSourceManager;

                dataSourceManager.AddListener(new ListenerAnonymousInnerClass(this));
            }
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @VisibleForTesting static StoreSizeMBean createBean(ManagementData management, boolean isMxBean, long updateInterval, java.time.Clock clock)
        internal static StoreSizeMBean CreateBean(ManagementData management, bool isMxBean, long updateInterval, Clock clock)
        {
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final StoreSizeMBean bean = new StoreSizeMBean(management, isMxBean, updateInterval, clock);
            StoreSizeMBean bean = new StoreSizeMBean(management, isMxBean, updateInterval, clock);
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final org.neo4j.kernel.impl.transaction.state.DataSourceManager dataSourceManager = management.getKernelData().getDataSourceManager();
            DataSourceManager dataSourceManager = management.KernelData.DataSourceManager;

            dataSourceManager.AddListener(bean);
            return(bean);
        }
コード例 #3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @BeforeEach void setUp() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void SetUp()
        {
            _logFiles = LogFilesBuilder.logFilesBasedOnlyBuilder(_testDirectory.databaseDir(), _fs).build();

            Dependencies       dependencies      = new Dependencies();
            Config             config            = Config.defaults(default_schema_provider, _indexProvider.ProviderDescriptor.name());
            DataSourceManager  dataSourceManager = new DataSourceManager(config);
            GraphDatabaseAPI   db         = mock(typeof(GraphDatabaseAPI));
            NeoStoreDataSource dataSource = mock(typeof(NeoStoreDataSource));

            dependencies.SatisfyDependency(_indexProvider);
            dependencies.SatisfyDependency(_indexProvider2);

            DefaultIndexProviderMap indexProviderMap = new DefaultIndexProviderMap(dependencies, config);

            indexProviderMap.Init();

            // Setup all dependencies
            dependencies.SatisfyDependency(_fs);
            dependencies.SatisfyDependencies(dataSourceManager);
            dependencies.SatisfyDependency(_logFiles);
            dependencies.SatisfyDependency(_explicitIndexProviderLookup);
            dependencies.SatisfyDependency(indexProviderMap);
            dependencies.SatisfyDependency(_labelScanStore);
            when(Db.DependencyResolver).thenReturn(dependencies);
            when(dataSource.DependencyResolver).thenReturn(dependencies);
            when(dataSource.DatabaseLayout).thenReturn(_testDirectory.databaseLayout());

            // Start DataSourceManager
            dataSourceManager.Register(dataSource);
            dataSourceManager.Start();

            // Create bean
            KernelData kernelData = new KernelData(_fs, mock(typeof(PageCache)), _testDirectory.databaseDir(), config, dataSourceManager);

            _managementData = new ManagementData(new StoreSizeBean(), kernelData, ManagementSupport.Load());
            _storeSizeBean  = StoreSizeBean.CreateBean(_managementData, false, 0, mock(typeof(Clock)));

            when(_indexProvider.directoryStructure()).thenReturn(mock(typeof(IndexDirectoryStructure)));
            when(_indexProvider2.directoryStructure()).thenReturn(mock(typeof(IndexDirectoryStructure)));
            when(_labelScanStore.LabelScanStoreFile).thenReturn(_testDirectory.databaseLayout().labelScanStore());
        }
コード例 #4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected Neo4jMBean(ManagementData management, String... extraNaming) throws javax.management.NotCompliantMBeanException
        protected internal Neo4jMBean(ManagementData management, params string[] extraNaming) : base(management.Provider.beanInterface)
        {
            management.Validate(this.GetType());
            this.ObjectName = management.GetObjectName(extraNaming);
        }
コード例 #5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected Neo4jMBean createMBean(ManagementData management) throws javax.management.NotCompliantMBeanException
        protected internal override Neo4jMBean CreateMBean(ManagementData management)
        {
            return(new StoreFileImpl(management));
        }
コード例 #6
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: PrimitivesImpl(ManagementData management) throws javax.management.NotCompliantMBeanException
            internal PrimitivesImpl(ManagementData management) : base(management)
            {
                this.IdGeneratorFactory = management.ResolveDependency(typeof(IdGeneratorFactory));
            }
コード例 #7
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected Neo4jMBean createMBean(ManagementData management) throws javax.management.NotCompliantMBeanException
        protected internal override Neo4jMBean CreateMBean(ManagementData management)
        {
            return(new PrimitivesImpl(management));
        }
コード例 #8
0
 internal StoreSizeMBean(ManagementData management, bool isMXBean, long updateInterval, Clock clock) : base(management, isMXBean)
 {
     this.Fs             = management.KernelData.FilesystemAbstraction;
     this.UpdateInterval = updateInterval;
     this.Clock          = clock;
 }
コード例 #9
0
 protected internal override Neo4jMBean CreateMXBean(ManagementData management)
 {
     return(CreateBean(management, true, UPDATE_INTERVAL, Clock.systemUTC()));
 }