Beispiel #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void createAndCloseContainerWithPageCacheAndScheduler() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void CreateAndCloseContainerWithPageCacheAndScheduler()
        {
            BackupPageCacheContainer pageCacheContainer = BackupPageCacheContainer.Of(_pageCache, _jobScheduler);

            pageCacheContainer.Close();

            verify(_pageCache).close();
            verify(_jobScheduler).close();
        }
Beispiel #2
0
 BackupProtocolService(System.Func <FileSystemAbstraction> _fileSystemSupplier, LogProvider _logProvider, Stream _logDestination, Monitors _monitors, BackupPageCacheContainer pageCacheContainer)
 {
     this._fileSystemSupplier = _fileSystemSupplier;
     this._logProvider        = _logProvider;
     this._log                = _logProvider.getLog(this.GetType());
     this._logDestination     = _logDestination;
     this._monitors           = _monitors;
     this._pageCacheContianer = pageCacheContainer;
 }
Beispiel #3
0
        public static BackupProtocolService BackupProtocolService(Stream logDestination)
        {
            JobScheduler             scheduler          = createInitialisedScheduler();
            PageCache                pageCache          = createPageCache(new DefaultFileSystemAbstraction(), scheduler);
            BackupPageCacheContainer pageCacheContainer = of(pageCache, scheduler);

//JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter:
            return(BackupProtocolService(DefaultFileSystemAbstraction::new, toOutputStream(logDestination), logDestination, new Monitors(), pageCacheContainer));
        }
Beispiel #4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void closePageCacheContainerOnClose() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        internal virtual void ClosePageCacheContainerOnClose()
        {
            PageCache pageCache = mock(typeof(PageCache));
            BackupPageCacheContainer container = BackupPageCacheContainer.Of(pageCache);
//JAVA TO C# CONVERTER TODO TASK: Method reference constructor syntax is not converted by Java to C# Converter:
            BackupProtocolService protocolService = new BackupProtocolService(EphemeralFileSystemAbstraction::new, NullLogProvider.Instance, NULL_OUTPUT_STREAM, new Monitors(), container);

            protocolService.Close();

            verify(pageCache).close();
        }
Beispiel #5
0
 private static BackupProtocolService BackupProtocolService(System.Func <FileSystemAbstraction> fileSystemSupplier, LogProvider logProvider, Stream logDestination, Monitors monitors, BackupPageCacheContainer pageCacheContainer)
 {
     requireNonNull(fileSystemSupplier);
     requireNonNull(logProvider);
     requireNonNull(logDestination);
     requireNonNull(monitors);
     requireNonNull(pageCacheContainer);
     return(new BackupProtocolService(fileSystemSupplier, logProvider, logDestination, monitors, pageCacheContainer));
 }