/// <param name="config"> /// @return </param> protected internal virtual PipelineWrapper CreatePipelineWrapper(Config config) { SecurePipelineWrapperFactory factory = new SecurePipelineWrapperFactory(); Dependencies deps = new Dependencies(); deps.SatisfyDependencies(new object[] { SslPolicyLoader.create(config, this.LogProvider) }); return(factory.ForClient(config, deps, this.LogProvider, OnlineBackupSettings.ssl_policy)); }
public CommunityEditionModule(PlatformModule platformModule) { Org.Neo4j.Kernel.impl.util.Dependencies dependencies = platformModule.Dependencies; Config config = platformModule.Config; LogService logging = platformModule.Logging; FileSystemAbstraction fileSystem = platformModule.FileSystem; PageCache pageCache = platformModule.PageCache; DataSourceManager dataSourceManager = platformModule.DataSourceManager; LifeSupport life = platformModule.Life; life.Add(platformModule.DataSourceManager); WatcherServiceFactoryConflict = databaseDir => CreateFileSystemWatcherService(fileSystem, databaseDir, logging, platformModule.JobScheduler, config, FileWatcherFileNameFilter()); this.AccessCapabilityConflict = config.Get(GraphDatabaseSettings.read_only) ? new ReadOnly() : new CanWrite(); dependencies.SatisfyDependency(SslPolicyLoader.create(config, logging.InternalLogProvider)); // for bolt and web server LocksFactory lockFactory = createLockFactory(config, logging); LocksSupplierConflict = () => createLockManager(lockFactory, config, platformModule.Clock); StatementLocksFactoryProviderConflict = locks => CreateStatementLocksFactory(locks, config, logging); ThreadToTransactionBridgeConflict = dependencies.SatisfyDependency(new ThreadToStatementContextBridge(GetGlobalAvailabilityGuard(platformModule.Clock, logging, platformModule.Config))); IdContextFactoryConflict = CreateIdContextFactory(platformModule, fileSystem); TokenHoldersProviderConflict = CreateTokenHolderProvider(platformModule); File kernelContextDirectory = platformModule.StoreLayout.storeDirectory(); dependencies.SatisfyDependency(CreateKernelData(fileSystem, pageCache, kernelContextDirectory, config, life, dataSourceManager)); CommitProcessFactoryConflict = new CommunityCommitProcessFactory(); HeaderInformationFactoryConflict = CreateHeaderInformationFactory(); SchemaWriteGuardConflict = CreateSchemaWriteGuard(); TransactionStartTimeoutConflict = config.Get(GraphDatabaseSettings.transaction_start_timeout).toMillis(); ConstraintSemanticsConflict = CreateSchemaRuleVerifier(); IoLimiterConflict = Org.Neo4j.Io.pagecache.IOLimiter_Fields.Unlimited; ConnectionTrackerConflict = dependencies.SatisfyDependency(CreateConnectionTracker()); PublishEditionInfo(dependencies.ResolveDependency(typeof(UsageData)), platformModule.DatabaseInfo, config); }
/// /// <param name="platformModule"> </param> /// <param name="discoveryServiceFactory"> </param> /// <param name="clusterStateDirectory"> </param> /// <param name="identityModule"> </param> /// <param name="dependencies"> </param> /// <param name="databaseLayout"> /// @return </param> protected internal virtual ClusteringModule GetClusteringModule(PlatformModule platformModule, DiscoveryServiceFactory discoveryServiceFactory, ClusterStateDirectory clusterStateDirectory, IdentityModule identityModule, Dependencies dependencies, DatabaseLayout databaseLayout) { SslPolicyLoader sslPolicyFactory = ( SslPolicyLoader )dependencies.SatisfyDependency(SslPolicyLoader.create(this.Config, this.LogProvider)); SslPolicy sslPolicy = sslPolicyFactory.GetPolicy(( string )this.Config.get(CausalClusteringSettings.SslPolicy)); if (discoveryServiceFactory is SecureHazelcastDiscoveryServiceFactory) { (( SecureHazelcastDiscoveryServiceFactory )discoveryServiceFactory).SslPolicy = sslPolicy; } return(new ClusteringModule(discoveryServiceFactory, identityModule.Myself(), platformModule, clusterStateDirectory.Get(), databaseLayout)); }
/// <param name="discoveryServiceFactory"> </param> /// <param name="dependencies"> </param> /// <param name="config"> </param> /// <param name="logProvider"> </param> protected internal virtual void ConfigureDiscoveryService(DiscoveryServiceFactory discoveryServiceFactory, Dependencies dependencies, Config config, LogProvider logProvider) { SslPolicyLoader sslPolicyFactory = ( SslPolicyLoader )dependencies.SatisfyDependency(SslPolicyLoader.create(config, logProvider)); SslPolicy clusterSslPolicy = sslPolicyFactory.GetPolicy(( string )config.Get(CausalClusteringSettings.ssl_policy)); if (discoveryServiceFactory is SecureHazelcastDiscoveryServiceFactory) { (( SecureHazelcastDiscoveryServiceFactory )discoveryServiceFactory).SslPolicy = clusterSslPolicy; } }