Ejemplo n.º 1
0
        internal BackupStrategyCoordinatorFactory(BackupModule backupModule)
        {
            this._logProvider  = backupModule.LogProvider;
            this._outsideWorld = backupModule.OutsideWorld;

            this._consistencyCheckService = new ConsistencyCheckService();
            this._addressResolver         = new AddressResolver();
        }
Ejemplo n.º 2
0
 protected internal BackupSupportingClassesFactory(BackupModule backupModule)
 {
     this.LogProvider                  = backupModule.LogProvider;
     this.Clock                        = backupModule.Clock;
     this.Monitors                     = backupModule.Monitors;
     this.FileSystemAbstraction        = backupModule.FileSystemAbstraction;
     this.TransactionLogCatchUpFactory = backupModule.TransactionLogCatchUpFactory;
     this._jobScheduler                = backupModule.JobScheduler();
     this.LogDestination               = backupModule.OutsideWorld.outStream();
     this.OutsideWorld                 = backupModule.OutsideWorld;
 }
Ejemplo n.º 3
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Override @Nonnull public org.neo4j.commandline.admin.AdminCommand create(java.nio.file.Path homeDir, java.nio.file.Path configDir, org.neo4j.commandline.admin.OutsideWorld outsideWorld)
        public override AdminCommand Create(Path homeDir, Path configDir, OutsideWorld outsideWorld)
        {
            bool        debug       = System.getenv().get("NEO4J_DEBUG") != null;
            LogProvider logProvider = FormattedLogProvider.withDefaultLogLevel(debug ? Level.DEBUG : Level.NONE).toOutputStream(outsideWorld.OutStream());
            Monitors    monitors    = new Monitors();

            OnlineBackupContextFactory contextBuilder = new OnlineBackupContextFactory(homeDir, configDir);
            BackupModule backupModule = new BackupModule(outsideWorld, logProvider, monitors);

            BackupSupportingClassesFactoryProvider classesFactoryProvider   = ProvidersByPriority.findFirst().orElseThrow(NoProviderException());
            BackupSupportingClassesFactory         supportingClassesFactory = classesFactoryProvider.GetFactory(backupModule);
            BackupStrategyCoordinatorFactory       coordinatorFactory       = new BackupStrategyCoordinatorFactory(backupModule);

            return(new OnlineBackupCommand(outsideWorld, contextBuilder, supportingClassesFactory, coordinatorFactory));
        }
Ejemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void communityBackupSupportingFactory()
        public virtual void CommunityBackupSupportingFactory()
        {
            AssertableLogProvider logProvider = new AssertableLogProvider();

            //OutsideWorld outsideWorld = mock( OutsideWorld.class );

            RealOutsideWorld      outsideWorld   = new RealOutsideWorld();
            FileSystemAbstraction fileSystemMock = mock(typeof(FileSystemAbstraction));

            //outsideWorld.fileSystemAbstraction = fileSystemMock;
            Monitors monitors = mock(typeof(Monitors));

            BackupModule backupModule = new BackupModule(outsideWorld, logProvider, monitors);

            // when( backupModule.getOutsideWorld() ).thenReturn( outsideWorld );

            BackupSupportingClassesFactoryProvider provider = ProvidersByPriority.findFirst().get();

            BackupSupportingClassesFactory factory = provider.GetFactory(backupModule);

            /*
             * SecurePipelineWrapperFactory pipelineWrapperFactory = new SecurePipelineWrapperFactory();
             * SslPolicyLoader sslPolicyLoader;
             * // and
             * Config config = Config.defaults();
             * config.augment( CausalClusteringSettings.ssl_policy, "default" );
             *
             * // We want to create dependencies the same way factory.createPipelineWrapper does so.s
             * Dependencies dependencies = new Dependencies(  );
             * dependencies.satisfyDependencies(new Object[]{SslPolicyLoader.create(config, logProvider)});
             *
             * assertEquals( pipelineWrapperFactory.forClient(config, dependencies, logProvider, CausalClusteringSettings.ssl_policy),
             *      factory.createPipelineWrapper( Config.defaults() ) );
             */

            assertEquals(typeof(SecureClientPipelineWrapper), factory.CreatePipelineWrapper(Config.defaults()).GetType());
        }
Ejemplo n.º 5
0
 public virtual BackupSupportingClassesFactory GetFactory(BackupModule backupModule)
 {
     return(new BackupSupportingClassesFactory(backupModule));
 }
Ejemplo n.º 6
0
 public override BackupSupportingClassesFactory GetFactory(BackupModule backupModule)
 {
     return(new BackupSupportingClassesFactoryAnonymousInnerClass(this, backupModule));
 }
Ejemplo n.º 7
0
 internal OpenEnterpriseBackupSupportingClassesFactory(BackupModule backupModule) : base(backupModule)
 {
 }