Пример #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private static void writeTxLogCounters(org.neo4j.io.fs.FileSystemAbstraction fs, java.io.File file, long... counters) throws java.io.IOException
        private static void WriteTxLogCounters(FileSystemAbstraction fs, File file, params long[] counters)
        {
            using (Writer writer = fs.OpenAsWriter(file, StandardCharsets.UTF_8, false))
            {
                writer.write(StringUtils.join(counters, TX_LOG_COUNTERS_SEPARATOR));
            }
        }
Пример #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: static void saveFulltextIndexSettings(FulltextIndexDescriptor descriptor, java.io.File indexFolder, org.neo4j.io.fs.FileSystemAbstraction fs) throws java.io.IOException
        internal static void SaveFulltextIndexSettings(FulltextIndexDescriptor descriptor, File indexFolder, FileSystemAbstraction fs)
        {
            File       indexConfigFile = new File(indexFolder, INDEX_CONFIG_FILE);
            Properties settings        = new Properties();

            settings.setProperty(INDEX_CONFIG_EVENTUALLY_CONSISTENT, Convert.ToString(descriptor.EventuallyConsistent));
            settings.setProperty(INDEX_CONFIG_ANALYZER, descriptor.AnalyzerName());
//JAVA TO C# CONVERTER TODO TASK: Most Java stream collectors are not converted by Java to C# Converter:
            settings.setProperty(INDEX_CONFIG_PROPERTY_NAMES, descriptor.PropertyNames().collect(Collectors.joining(", ", "[", "]")));
            settings.setProperty("_propertyIds", Arrays.ToString(descriptor.Properties()));
            settings.setProperty("_name", descriptor.Name());
            settings.setProperty("_schema_entityType", descriptor.Schema().entityType().name());
            settings.setProperty("_schema_entityTokenIds", Arrays.ToString(descriptor.Schema().EntityTokenIds));
            using (StoreChannel channel = fs.Create(indexConfigFile), Writer writer = fs.OpenAsWriter(indexConfigFile, StandardCharsets.UTF_8, false))
            {
                settings.store(writer, "Auto-generated file. Do not modify!");
                writer.flush();
                channel.Force(true);
            }
        }