Exemple #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void deleteLogs(org.neo4j.io.layout.DatabaseLayout databaseLayout) throws java.io.IOException
        private static void DeleteLogs(DatabaseLayout databaseLayout)
        {
            using (DefaultFileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction())
            {
                LogFiles logFiles = LogFilesBuilder.logFilesBasedOnlyBuilder(databaseLayout.DatabaseDirectory(), fileSystem).build();
                foreach (File file in logFiles.LogFilesConflict())
                {
                    fileSystem.DeleteFile(file);
                }
            }
        }
Exemple #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void deleteAllLogsOn(java.io.File storeDirectory) throws java.io.IOException
        private static void DeleteAllLogsOn(File storeDirectory)
        {
            using (DefaultFileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction())
            {
                LogFiles logFiles = LogFilesBuilder.logFilesBasedOnlyBuilder(storeDirectory, fileSystem).build();
                foreach (File file in logFiles.LogFilesConflict())
                {
                    fileSystem.DeleteFile(file);
                }
            }
        }
Exemple #3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static void main(String[] args) throws Exception
        public static void Main(string[] args)
        {
            // Just start and immediately close. The process spawning this subprocess will kill it in the middle of all this
            File file = new File(args[0]);

            using (FileSystemAbstraction fs = new DefaultFileSystemAbstraction(), JobScheduler jobScheduler = new ThreadPoolJobScheduler())
            {
                SingleFilePageSwapperFactory swapper = new SingleFilePageSwapperFactory();
                swapper.Open(fs, EMPTY);
                using (PageCache pageCache = new MuninnPageCache(swapper, 10, PageCacheTracer.NULL, Org.Neo4j.Io.pagecache.tracing.cursor.PageCursorTracerSupplier_Fields.Null, EmptyVersionContextSupplier.EMPTY, jobScheduler))
                {
                    fs.DeleteFile(file);
                    (new GBPTreeBuilder <>(pageCache, file, longLayout().build())).Build().Dispose();
                }
            }
        }