org.neo4j.kernel.impl.util.Dependencies.satisfyDependencies()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(10.9k)|赞(0)|评价(0)|浏览(116)

本文整理了Java中org.neo4j.kernel.impl.util.Dependencies.satisfyDependencies()方法的一些代码示例,展示了Dependencies.satisfyDependencies()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dependencies.satisfyDependencies()方法的具体详情如下:
包路径:org.neo4j.kernel.impl.util.Dependencies
类名称:Dependencies
方法名:satisfyDependencies

Dependencies.satisfyDependencies介绍

暂无

代码示例

代码示例来源:origin: neo4j/neo4j

public void satisfyDependencies( Dependencies dependencies )
  {
    dependencies.satisfyDependencies( transactionCommitProcess, kernel, kernelTransactions, fileListing );
  }
}

代码示例来源:origin: neo4j/neo4j

public void satisfyDependencies( Dependencies dependencies )
  {
    dependencies.satisfyDependencies( checkPointer,
                     logFiles,
                     logFiles.getLogFileInformation(),
                     explicitIndexTransactionOrdering,
                     logicalTransactionStore,
                     logRotation,
                     appender );
  }
}

代码示例来源:origin: neo4j/neo4j

private static DependencyResolver buildIndexDependencies( IndexProvider... providers )
{
  Dependencies dependencies = new Dependencies();
  dependencies.satisfyDependencies( (Object[]) providers );
  return dependencies;
}

代码示例来源:origin: neo4j/neo4j

@SuppressWarnings( "unchecked" )
  public static DatabaseKernelExtensions instantiateKernelExtensions(
      File databaseDirectory, FileSystemAbstraction fileSystem, Config config, LogService logService, PageCache pageCache, JobScheduler jobScheduler,
      RecoveryCleanupWorkCollector recoveryCollector, DatabaseInfo databaseInfo, Monitors monitors, TokenHolders tokenHolders )
  {
    Dependencies deps = new Dependencies();
    deps.satisfyDependencies( fileSystem, config, logService, pageCache, recoveryCollector, monitors, jobScheduler, tokenHolders );
    @SuppressWarnings( "rawtypes" )
    Iterable kernelExtensions = Service.load( KernelExtensionFactory.class );
    KernelContext kernelContext = new SimpleKernelContext( databaseDirectory, databaseInfo, deps );
    return new DatabaseKernelExtensions( kernelContext, kernelExtensions, deps, KernelExtensionFailureStrategies.ignore() );
  }
}

代码示例来源:origin: neo4j/neo4j

@BeforeEach
void setUp()
{
  Dependencies dependencies = new Dependencies();
  dependencies.satisfyDependencies( new StubIdGeneratorFactory() );
  dependencies.satisfyDependencies( fileSystem );
  when( dataSource.getDependencyResolver() ).thenReturn( dependencies );
  when( dataSource.getDatabaseLayout() ).thenReturn( DatabaseLayout.of( new File( "database" ) ) );
  when( dataSource.getStoreId() ).thenReturn( StoreId.DEFAULT );
  dataSourceManager.start();
  dataSourceManager.register( dataSource );
}

代码示例来源:origin: neo4j/neo4j

@Test
public void shouldAlwaysShutdownLifeEvenWhenCheckPointingFails() throws Exception
{
  // Given
  FileSystemAbstraction fs = this.fs.get();
  PageCache pageCache = pageCacheRule.getPageCache( fs );
  DatabaseHealth databaseHealth = mock( DatabaseHealth.class );
  when( databaseHealth.isHealthy() ).thenReturn( true );
  IOException ex = new IOException( "boom!" );
  doThrow( ex ).when( databaseHealth )
      .assertHealthy( IOException.class ); // <- this is a trick to simulate a failure during checkpointing
  Dependencies dependencies = new Dependencies();
  dependencies.satisfyDependencies( databaseHealth );
  NeoStoreDataSource dataSource = dsRule.getDataSource( dir.databaseLayout(), fs, pageCache, dependencies );
  dataSource.start();
  try
  {
    // When
    dataSource.stop();
    fail( "it should have thrown" );
  }
  catch ( LifecycleException e )
  {
    // Then
    assertEquals( ex, e.getCause() );
  }
}

代码示例来源:origin: neo4j/neo4j

@Override
protected QueryExecutionEngine createEngine( Dependencies deps, GraphDatabaseAPI graphAPI )
{
  GraphDatabaseCypherService queryService = new GraphDatabaseCypherService( graphAPI );
  deps.satisfyDependency( queryService );
  DependencyResolver resolver = graphAPI.getDependencyResolver();
  LogService logService = resolver.resolveDependency( LogService.class );
  Monitors monitors = resolver.resolveDependency( Monitors.class );
  Config config = resolver.resolveDependency( Config.class );
  CypherConfiguration cypherConfig = CypherConfiguration.fromConfig( config );
  CypherPlannerConfiguration plannerConfig = cypherConfig.toCypherPlannerConfiguration( config );
  CypherRuntimeConfiguration runtimeConfig = cypherConfig.toCypherRuntimeConfiguration();
  LogProvider logProvider = logService.getInternalLogProvider();
  CommunityCompilerFactory compilerFactory =
      new CommunityCompilerFactory( queryService, monitors, logProvider, plannerConfig, runtimeConfig );
  deps.satisfyDependencies( compilerFactory );
  return createEngine( queryService, config, logProvider, compilerFactory );
}

代码示例来源:origin: neo4j/neo4j

platform.dependencies.satisfyDependencies( securityProvider.authManager() );
platform.dependencies.satisfyDependencies( securityProvider.userManagerSupplier() );

代码示例来源:origin: neo4j/neo4j

dependencies.satisfyDependencies( dataSourceManager );
dependencies.satisfyDependency( logFiles );
dependencies.satisfyDependency( explicitIndexProviderLookup );

代码示例来源:origin: neo4j/neo4j

@Test
public void logModuleSetUpError()
{
  Config config = Config.defaults();
  IdGeneratorFactory idGeneratorFactory = mock( IdGeneratorFactory.class );
  Throwable openStoresError = new RuntimeException( "Can't set up modules" );
  doThrow( openStoresError ).when( idGeneratorFactory ).create( any( File.class ), anyLong(), anyBoolean() );
  CommunityIdTypeConfigurationProvider idTypeConfigurationProvider =
      new CommunityIdTypeConfigurationProvider();
  AssertableLogProvider logProvider = new AssertableLogProvider();
  SimpleLogService logService = new SimpleLogService( logProvider, logProvider );
  PageCache pageCache = pageCacheRule.getPageCache( fs.get() );
  Dependencies dependencies = new Dependencies();
  dependencies.satisfyDependencies( idGeneratorFactory, idTypeConfigurationProvider, config, logService );
  NeoStoreDataSource dataSource = dsRule.getDataSource( dir.databaseLayout(), fs.get(),
      pageCache, dependencies );
  try
  {
    dataSource.start();
    fail( "Exception expected" );
  }
  catch ( Exception e )
  {
    assertEquals( openStoresError, e );
  }
  logProvider.assertAtLeastOnce( inLog( NeoStoreDataSource.class ).warn(
      equalTo( "Exception occurred while setting up store modules. Attempting to close things down." ),
      equalTo( openStoresError ) ) );
}

代码示例来源:origin: neo4j/neo4j

public void initialize( Input input ) throws IOException
{
  log.info( "Import starting" );
  startTime = currentTimeMillis();
  this.input = input;
  PageCacheArrayFactoryMonitor numberArrayFactoryMonitor = new PageCacheArrayFactoryMonitor();
  numberArrayFactory = auto( neoStore.getPageCache(), storeDir, config.allowCacheAllocationOnHeap(), numberArrayFactoryMonitor );
  badCollector = input.badCollector();
  // Some temporary caches and indexes in the import
  idMapper = input.idMapper( numberArrayFactory );
  nodeRelationshipCache = new NodeRelationshipCache( numberArrayFactory, config.denseNodeThreshold() );
  Estimates inputEstimates = input.calculateEstimates( neoStore.getPropertyStore().newValueEncodedSizeCalculator() );
  // Sanity checking against estimates
  new EstimationSanityChecker( recordFormats, monitor ).sanityCheck( inputEstimates );
  new HeapSizeSanityChecker( monitor ).sanityCheck( inputEstimates, recordFormats, neoStore,
      nodeRelationshipCache.memoryEstimation( inputEstimates.numberOfNodes() ),
      idMapper.memoryEstimation( inputEstimates.numberOfNodes() ) );
  dependencies.satisfyDependencies( inputEstimates, idMapper, neoStore, nodeRelationshipCache, numberArrayFactoryMonitor );
  if ( neoStore.determineDoubleRelationshipRecordUnits( inputEstimates ) )
  {
    monitor.doubleRelationshipRecordUnitsEnabled();
  }
  executionMonitor.initialize( dependencies );
}

代码示例来源:origin: neo4j/neo4j

Monitors monitors = new Monitors();
deps.satisfyDependencies( fileSystem, config, logService, storeIndexStoreView, pageCache, monitors, RecoveryCleanupWorkCollector.immediate() );

代码示例来源:origin: org.neo4j/neo4j-kernel

public void satisfyDependencies( Dependencies dependencies )
  {
    dependencies.satisfyDependencies( transactionCommitProcess, kernel, kernelTransactions, fileListing );
  }
}

代码示例来源:origin: org.neo4j/neo4j-kernel

public void satisfyDependencies( Dependencies dependencies )
  {
    dependencies.satisfyDependencies( checkPointer,
                     logFiles,
                     logFiles.getLogFileInformation(),
                     explicitIndexTransactionOrdering,
                     logicalTransactionStore,
                     logRotation,
                     appender );
  }
}

代码示例来源:origin: org.neo4j/neo4j-causal-clustering-commercial

@Override
  protected PipelineWrapper createPipelineWrapper( Config config )
  {
    SecureClusteringPipelineFactory factory = new SecureClusteringPipelineFactory();
    Dependencies deps = new Dependencies();
    deps.satisfyDependencies( SslPolicyLoader.create( config, logProvider ) );
    return factory.forServer( config, deps, logProvider );
  }
}

代码示例来源:origin: org.neo4j/neo4j

platform.dependencies.satisfyDependencies( securityProvider.authManager() );
platform.dependencies.satisfyDependencies( securityProvider.userManagerSupplier() );

代码示例来源:origin: org.neo4j/neo4j-cypher

@Override
protected QueryExecutionEngine createEngine( Dependencies deps, GraphDatabaseAPI graphAPI )
{
  GraphDatabaseCypherService queryService = new GraphDatabaseCypherService( graphAPI );
  deps.satisfyDependency( queryService );
  DependencyResolver resolver = graphAPI.getDependencyResolver();
  LogService logService = resolver.resolveDependency( LogService.class );
  Monitors monitors = resolver.resolveDependency( Monitors.class );
  Config config = resolver.resolveDependency( Config.class );
  CypherConfiguration cypherConfig = CypherConfiguration.fromConfig( config );
  CypherPlannerConfiguration plannerConfig = cypherConfig.toCypherPlannerConfiguration( config );
  CypherRuntimeConfiguration runtimeConfig = cypherConfig.toCypherRuntimeConfiguration();
  LogProvider logProvider = logService.getInternalLogProvider();
  CommunityCompilerFactory compilerFactory =
      new CommunityCompilerFactory( queryService, monitors, logProvider, plannerConfig, runtimeConfig );
  deps.satisfyDependencies( compilerFactory );
  return createEngine( queryService, config, logProvider, compilerFactory );
}

代码示例来源:origin: org.neo4j/neo4j-kernel

public void initialize( Input input ) throws IOException
{
  log.info( "Import starting" );
  startTime = currentTimeMillis();
  this.input = input;
  PageCacheArrayFactoryMonitor numberArrayFactoryMonitor = new PageCacheArrayFactoryMonitor();
  numberArrayFactory = auto( neoStore.getPageCache(), storeDir, config.allowCacheAllocationOnHeap(), numberArrayFactoryMonitor );
  badCollector = input.badCollector();
  // Some temporary caches and indexes in the import
  idMapper = input.idMapper( numberArrayFactory );
  nodeRelationshipCache = new NodeRelationshipCache( numberArrayFactory, config.denseNodeThreshold() );
  Estimates inputEstimates = input.calculateEstimates( neoStore.getPropertyStore().newValueEncodedSizeCalculator() );
  // Sanity checking against estimates
  new EstimationSanityChecker( recordFormats, monitor ).sanityCheck( inputEstimates );
  new HeapSizeSanityChecker( monitor ).sanityCheck( inputEstimates, recordFormats, neoStore,
      nodeRelationshipCache.memoryEstimation( inputEstimates.numberOfNodes() ),
      idMapper.memoryEstimation( inputEstimates.numberOfNodes() ) );
  dependencies.satisfyDependencies( inputEstimates, idMapper, neoStore, nodeRelationshipCache, numberArrayFactoryMonitor );
  if ( neoStore.determineDoubleRelationshipRecordUnits( inputEstimates ) )
  {
    monitor.doubleRelationshipRecordUnitsEnabled();
  }
  executionMonitor.initialize( dependencies );
}

代码示例来源:origin: org.neo4j/neo4j-kernel

Monitors monitors = new Monitors();
deps.satisfyDependencies( fileSystem, config, logService, storeIndexStoreView, pageCache, monitors, RecoveryCleanupWorkCollector.immediate() );

代码示例来源:origin: org.neo4j/neo4j-core-edge

config.get( state_machine_apply_max_batch_size ), logProvider );
dependencies.satisfyDependencies( replicatedTxStateMachine );

相关文章