lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [40/50] lucenenet git commit: SWEEP: Changed all SizeInBytes() methods to GetSizeInBytes()
Date Thu, 30 Mar 2017 18:00:35 GMT
SWEEP: Changed all SizeInBytes() methods to GetSizeInBytes()


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/b6dcfe8a
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/b6dcfe8a
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/b6dcfe8a

Branch: refs/heads/api-work
Commit: b6dcfe8aad432d1c7add7bd5f0619a5f3ba56c92
Parents: d850d55
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Mar 30 16:58:01 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Thu Mar 30 16:58:01 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/VariableGapTermsIndexReader.cs       |  2 +-
 src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs   |  2 +-
 src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs      |  2 +-
 .../Memory/MemoryDocValuesProducer.cs               |  4 ++--
 .../Memory/MemoryPostingsFormat.cs                  |  2 +-
 .../SimpleText/SimpleTextFieldsReader.cs            |  2 +-
 src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs  |  4 ++--
 .../Codecs/Lucene42/Lucene42DocValuesProducer.cs    |  4 ++--
 src/Lucene.Net.Core/Index/BufferedUpdates.cs        |  4 ++--
 src/Lucene.Net.Core/Index/CheckIndex.cs             |  2 +-
 src/Lucene.Net.Core/Index/DocValuesUpdate.cs        | 10 +++++-----
 .../Index/DocumentsWriterPerThread.cs               |  4 ++--
 src/Lucene.Net.Core/Index/FrozenBufferedUpdates.cs  |  6 +++---
 src/Lucene.Net.Core/Index/IndexWriter.cs            | 10 +++++-----
 src/Lucene.Net.Core/Index/LogMergePolicy.cs         |  2 +-
 src/Lucene.Net.Core/Index/MergePolicy.cs            |  2 +-
 src/Lucene.Net.Core/Index/PrefixCodedTerms.cs       |  7 ++-----
 src/Lucene.Net.Core/Index/SegmentCommitInfo.cs      |  2 +-
 src/Lucene.Net.Core/Index/TieredMergePolicy.cs      |  4 ++--
 src/Lucene.Net.Core/Search/CachingWrapperFilter.cs  |  2 +-
 src/Lucene.Net.Core/Store/NRTCachingDirectory.cs    |  6 +++---
 src/Lucene.Net.Core/Store/RAMDirectory.cs           |  2 +-
 src/Lucene.Net.Core/Store/RAMFile.cs                |  9 +++------
 src/Lucene.Net.Core/Store/RAMOutputStream.cs        |  2 +-
 src/Lucene.Net.Core/Util/Fst/Builder.cs             |  4 ++--
 src/Lucene.Net.Core/Util/Fst/FST.cs                 |  2 +-
 src/Lucene.Net.Misc/Index/IndexSplitter.cs          |  2 +-
 .../Suggest/Analyzing/AnalyzingSuggester.cs         |  2 +-
 .../Suggest/Analyzing/FreeTextSuggester.cs          |  2 +-
 .../Suggest/Fst/FSTCompletionLookup.cs              |  4 ++--
 .../Suggest/Fst/WFSTCompletionLookup.cs             |  2 +-
 .../Index/AlcoholicMergePolicy.cs                   |  4 ++--
 .../Store/MockDirectoryWrapper.cs                   | 12 ++++++------
 .../Store/MockIndexOutputWrapper.cs                 |  2 +-
 src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs |  2 +-
 .../Index/TestIndexWriterOnDiskFull.cs              |  2 +-
 src/Lucene.Net.Tests/Index/TestRollingUpdates.cs    |  2 +-
 .../Index/TestSizeBoundedForceMerge.cs              |  2 +-
 .../Search/TestCachingWrapperFilter.cs              |  2 +-
 src/Lucene.Net.Tests/Store/TestRAMDirectory.cs      |  6 +++---
 src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs          | 16 ++++++++--------
 src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs           |  4 ++--
 42 files changed, 81 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
index ae692c6..fe56cc9 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/VariableGapTermsIndexReader.cs
@@ -261,7 +261,7 @@ namespace Lucene.Net.Codecs.BlockTerms
             /// <summary>Returns approximate RAM bytes used</summary>
             public virtual long RamBytesUsed()
             {
-                return fst == null ? 0 : fst.SizeInBytes();
+                return fst == null ? 0 : fst.GetSizeInBytes();
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
index 1e03403..85754de 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTOrdTermsReader.cs
@@ -1003,7 +1003,7 @@ namespace Lucene.Net.Codecs.Memory
             {
                 if (r.index != null)
                 {
-                    ramBytesUsed += r.index.SizeInBytes();
+                    ramBytesUsed += r.index.GetSizeInBytes();
                     ramBytesUsed += RamUsageEstimator.SizeOf(r.metaBytesBlock);
                     ramBytesUsed += RamUsageEstimator.SizeOf(r.metaLongsBlock);
                     ramBytesUsed += RamUsageEstimator.SizeOf(r.skipInfo);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
index 35ac4a2..7d732da 100644
--- a/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
+++ b/src/Lucene.Net.Codecs/Memory/FSTTermsReader.cs
@@ -909,7 +909,7 @@ namespace Lucene.Net.Codecs.Memory
             long ramBytesUsed = 0;
             foreach (TermsReader r in fields.Values)
             {
-                ramBytesUsed += r.dict == null ? 0 : r.dict.SizeInBytes();
+                ramBytesUsed += r.dict == null ? 0 : r.dict.GetSizeInBytes();
             }
             return ramBytesUsed;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
index 0537e00..b26bf2b 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryDocValuesProducer.cs
@@ -430,7 +430,7 @@ namespace Lucene.Net.Codecs.Memory
                 {
                     data.Seek(entry.offset);
                     instance = new FST<long?>(data, PositiveInt32Outputs.Singleton);
-                    ramBytesUsed.AddAndGet(instance.SizeInBytes());
+                    ramBytesUsed.AddAndGet(instance.GetSizeInBytes());
                     fstInstances[field.Number] = instance;
                 }
             }
@@ -545,7 +545,7 @@ namespace Lucene.Net.Codecs.Memory
                 {
                     data.Seek(entry.offset);
                     instance = new FST<long?>(data, PositiveInt32Outputs.Singleton);
-                    ramBytesUsed.AddAndGet(instance.SizeInBytes());
+                    ramBytesUsed.AddAndGet(instance.GetSizeInBytes());
                     fstInstances[field.Number] = instance;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
index fab9394..55a7e6f 100644
--- a/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
+++ b/src/Lucene.Net.Codecs/Memory/MemoryPostingsFormat.cs
@@ -1023,7 +1023,7 @@ namespace Lucene.Net.Codecs.Memory
 
             public long RamBytesUsed()
             {
-                return ((fst != null) ? fst.SizeInBytes() : 0);
+                return ((fst != null) ? fst.GetSizeInBytes() : 0);
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
index 172b257..731ef52 100644
--- a/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
+++ b/src/Lucene.Net.Codecs/SimpleText/SimpleTextFieldsReader.cs
@@ -674,7 +674,7 @@ namespace Lucene.Net.Codecs.SimpleText
             /// <summary>Returns approximate RAM bytes used</summary>
             public virtual long RamBytesUsed()
             {
-                return (_fst != null) ? _fst.SizeInBytes() : 0;
+                return (_fst != null) ? _fst.GetSizeInBytes() : 0;
             }
 
             public override TermsEnum GetIterator(TermsEnum reuse)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
index 3825e97..98bd36c 100644
--- a/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
+++ b/src/Lucene.Net.Core/Codecs/BlockTreeTermsReader.cs
@@ -678,7 +678,7 @@ namespace Lucene.Net.Codecs
             /// Returns approximate RAM bytes used </summary>
             public long RamBytesUsed()
             {
-                return ((index != null) ? index.SizeInBytes() : 0);
+                return ((index != null) ? index.GetSizeInBytes() : 0);
             }
 
             // NOTE: cannot seek!
@@ -1623,7 +1623,7 @@ namespace Lucene.Net.Codecs
                     {
                         stats.IndexNodeCount = outerInstance.index.NodeCount;
                         stats.IndexArcCount = outerInstance.index.ArcCount;
-                        stats.IndexNumBytes = outerInstance.index.SizeInBytes();
+                        stats.IndexNumBytes = outerInstance.index.GetSizeInBytes();
                     }
 
                     currentFrame = staticFrame;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
index dde3fdf..010adb0 100644
--- a/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
+++ b/src/Lucene.Net.Core/Codecs/Lucene42/Lucene42DocValuesProducer.cs
@@ -426,7 +426,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 {
                     data.Seek(entry.Offset);
                     instance = new FST<long?>(data, PositiveInt32Outputs.Singleton);
-                    ramBytesUsed.AddAndGet(instance.SizeInBytes());
+                    ramBytesUsed.AddAndGet(instance.GetSizeInBytes());
                     fstInstances[field.Number] = instance;
                 }
             }
@@ -541,7 +541,7 @@ namespace Lucene.Net.Codecs.Lucene42
                 {
                     data.Seek(entry.Offset);
                     instance = new FST<long?>(data, PositiveInt32Outputs.Singleton);
-                    ramBytesUsed.AddAndGet(instance.SizeInBytes());
+                    ramBytesUsed.AddAndGet(instance.GetSizeInBytes());
                     fstInstances[field.Number] = instance;
                 }
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/BufferedUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/BufferedUpdates.cs b/src/Lucene.Net.Core/Index/BufferedUpdates.cs
index e21d595..a069fb4 100644
--- a/src/Lucene.Net.Core/Index/BufferedUpdates.cs
+++ b/src/Lucene.Net.Core/Index/BufferedUpdates.cs
@@ -276,7 +276,7 @@ namespace Lucene.Net.Index
             numNumericUpdates.IncrementAndGet();
             if (current == null)
             {
-                bytesUsed.AddAndGet(BYTES_PER_NUMERIC_UPDATE_ENTRY + update.SizeInBytes());
+                bytesUsed.AddAndGet(BYTES_PER_NUMERIC_UPDATE_ENTRY + update.GetSizeInBytes());
             }
         }
 
@@ -311,7 +311,7 @@ namespace Lucene.Net.Index
             numBinaryUpdates.IncrementAndGet();
             if (current == null)
             {
-                bytesUsed.AddAndGet(BYTES_PER_BINARY_UPDATE_ENTRY + update.SizeInBytes());
+                bytesUsed.AddAndGet(BYTES_PER_BINARY_UPDATE_ENTRY + update.GetSizeInBytes());
             }
         }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/CheckIndex.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/CheckIndex.cs b/src/Lucene.Net.Core/Index/CheckIndex.cs
index 182b906..84657e1 100644
--- a/src/Lucene.Net.Core/Index/CheckIndex.cs
+++ b/src/Lucene.Net.Core/Index/CheckIndex.cs
@@ -717,7 +717,7 @@ namespace Lucene.Net.Index
                     segInfoStat.Compound = info.Info.UseCompoundFile;
                     Msg(infoStream, "    numFiles=" + info.Files().Count);
                     segInfoStat.NumFiles = info.Files().Count;
-                    segInfoStat.SizeMB = info.SizeInBytes() / (1024.0 * 1024.0);
+                    segInfoStat.SizeMB = info.GetSizeInBytes() / (1024.0 * 1024.0);
 #pragma warning disable 612, 618
                     if (info.Info.GetAttribute(Lucene3xSegmentInfoFormat.DS_OFFSET_KEY) == null)
 #pragma warning restore 612, 618

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/DocValuesUpdate.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocValuesUpdate.cs b/src/Lucene.Net.Core/Index/DocValuesUpdate.cs
index 17f20e8..5abd693 100644
--- a/src/Lucene.Net.Core/Index/DocValuesUpdate.cs
+++ b/src/Lucene.Net.Core/Index/DocValuesUpdate.cs
@@ -56,15 +56,15 @@ namespace Lucene.Net.Index
             this.value = value;
         }
 
-        internal abstract long ValueSizeInBytes(); // LUCENENT TODO: Name GetValueSizeInBytes() ?
+        internal abstract long GetValueSizeInBytes();
 
-        internal int SizeInBytes() // LUCENENT TODO: Name GetSizeInBytes() ?
+        internal int GetSizeInBytes()
         {
             int sizeInBytes = RAW_SIZE_IN_BYTES;
             sizeInBytes += term.Field.Length * RamUsageEstimator.NUM_BYTES_CHAR;
             sizeInBytes += term.Bytes.Bytes.Length;
             sizeInBytes += field.Length * RamUsageEstimator.NUM_BYTES_CHAR;
-            sizeInBytes += (int)ValueSizeInBytes();
+            sizeInBytes += (int)GetValueSizeInBytes();
             return sizeInBytes;
         }
 
@@ -87,7 +87,7 @@ namespace Lucene.Net.Index
             {
             }
 
-            internal override long ValueSizeInBytes()
+            internal override long GetValueSizeInBytes()
             {
                 return RAW_VALUE_SIZE_IN_BYTES + ((BytesRef)value).Bytes.Length;
             }
@@ -104,7 +104,7 @@ namespace Lucene.Net.Index
             {
             }
 
-            internal override long ValueSizeInBytes()
+            internal override long GetValueSizeInBytes()
             {
                 return RamUsageEstimator.NUM_BYTES_INT64;
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs b/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
index 90f80fd..980c954 100644
--- a/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
+++ b/src/Lucene.Net.Core/Index/DocumentsWriterPerThread.cs
@@ -580,7 +580,7 @@ namespace Lucene.Net.Index
 
                 if (infoStream.IsEnabled("DWPT"))
                 {
-                    double newSegmentSize = segmentInfoPerCommit.SizeInBytes() / 1024.0 / 1024.0;
+                    double newSegmentSize = segmentInfoPerCommit.GetSizeInBytes() / 1024.0 / 1024.0;
                     infoStream.Message("DWPT", "flushed: segment=" + segmentInfo.Name + " ramUsed=" + startMBUsed.ToString(nf) + " MB" + " newFlushedSize(includes docstores)=" + newSegmentSize.ToString(nf) + " MB" + " docs/MB=" + (flushState.SegmentInfo.DocCount / newSegmentSize).ToString(nf));
                 }
 
@@ -620,7 +620,7 @@ namespace Lucene.Net.Index
 
             IndexWriter.SetDiagnostics(newSegment.Info, IndexWriter.SOURCE_FLUSH);
 
-            IOContext context = new IOContext(new FlushInfo(newSegment.Info.DocCount, newSegment.SizeInBytes()));
+            IOContext context = new IOContext(new FlushInfo(newSegment.Info.DocCount, newSegment.GetSizeInBytes()));
 
             bool success = false;
             try

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/FrozenBufferedUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/FrozenBufferedUpdates.cs b/src/Lucene.Net.Core/Index/FrozenBufferedUpdates.cs
index c315b54..34130c3 100644
--- a/src/Lucene.Net.Core/Index/FrozenBufferedUpdates.cs
+++ b/src/Lucene.Net.Core/Index/FrozenBufferedUpdates.cs
@@ -109,7 +109,7 @@ namespace Lucene.Net.Index
                 foreach (NumericDocValuesUpdate update in numericUpdates.Values)
                 {
                     allNumericUpdates.Add(update);
-                    numericUpdatesSize += update.SizeInBytes();
+                    numericUpdatesSize += update.GetSizeInBytes();
                 }
             }
             numericDVUpdates = allNumericUpdates.ToArray();
@@ -125,12 +125,12 @@ namespace Lucene.Net.Index
                 foreach (BinaryDocValuesUpdate update in binaryUpdates.Values)
                 {
                     allBinaryUpdates.Add(update);
-                    binaryUpdatesSize += update.SizeInBytes();
+                    binaryUpdatesSize += update.GetSizeInBytes();
                 }
             }
             binaryDVUpdates = allBinaryUpdates.ToArray();
 
-            bytesUsed = (int)terms.SizeInBytes + queries.Length * BYTES_PER_DEL_QUERY + numericUpdatesSize + numericDVUpdates.Length * RamUsageEstimator.NUM_BYTES_OBJECT_REF + binaryUpdatesSize + binaryDVUpdates.Length * RamUsageEstimator.NUM_BYTES_OBJECT_REF;
+            bytesUsed = (int)terms.GetSizeInBytes() + queries.Length * BYTES_PER_DEL_QUERY + numericUpdatesSize + numericDVUpdates.Length * RamUsageEstimator.NUM_BYTES_OBJECT_REF + binaryUpdatesSize + binaryDVUpdates.Length * RamUsageEstimator.NUM_BYTES_OBJECT_REF;
 
             numTermDeletes = deletes.numTermDeletes.Get();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/IndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/IndexWriter.cs b/src/Lucene.Net.Core/Index/IndexWriter.cs
index 89aa132..d7d5bd4 100644
--- a/src/Lucene.Net.Core/Index/IndexWriter.cs
+++ b/src/Lucene.Net.Core/Index/IndexWriter.cs
@@ -3076,7 +3076,7 @@ namespace Lucene.Net.Index
                                 infoStream.Message("IW", "addIndexes: process segment origName=" + info.Info.Name + " newName=" + newSegName + " info=" + info);
                             }
 
-                            IOContext context = new IOContext(new MergeInfo(info.Info.DocCount, info.SizeInBytes(), true, -1));
+                            IOContext context = new IOContext(new MergeInfo(info.Info.DocCount, info.GetSizeInBytes(), true, -1));
 
                             foreach (FieldInfo fi in SegmentReader.ReadFieldInfos(info))
                             {
@@ -4719,8 +4719,8 @@ namespace Lucene.Net.Index
                         int delCount = NumDeletedDocs(info);
                         Debug.Assert(delCount <= info.Info.DocCount);
                         double delRatio = ((double)delCount) / info.Info.DocCount;
-                        merge.EstimatedMergeBytes += (long)(info.SizeInBytes() * (1.0 - delRatio));
-                        merge.totalMergeBytes += info.SizeInBytes();
+                        merge.EstimatedMergeBytes += (long)(info.GetSizeInBytes() * (1.0 - delRatio));
+                        merge.totalMergeBytes += info.GetSizeInBytes();
                     }
                 }
 
@@ -5217,8 +5217,8 @@ namespace Lucene.Net.Index
                 // lost...
 
                 if (infoStream.IsEnabled("IW"))
-                {
-                    infoStream.Message("IW", string.Format(CultureInfo.InvariantCulture, "merged segment size=%.3f MB vs estimate=%.3f MB", merge.info.SizeInBytes() / 1024.0 / 1024.0, merge.EstimatedMergeBytes / 1024 / 1024.0));
+                {// LUCENENET TODO: String formatting
+                    infoStream.Message("IW", string.Format(CultureInfo.InvariantCulture, "merged segment size=%.3f MB vs estimate=%.3f MB", merge.info.GetSizeInBytes() / 1024.0 / 1024.0, merge.EstimatedMergeBytes / 1024 / 1024.0));
                 }
 
                 IndexReaderWarmer mergedSegmentWarmer = config.MergedSegmentWarmer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/LogMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/LogMergePolicy.cs b/src/Lucene.Net.Core/Index/LogMergePolicy.cs
index 5b50c63..21a3079 100644
--- a/src/Lucene.Net.Core/Index/LogMergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/LogMergePolicy.cs
@@ -223,7 +223,7 @@ namespace Lucene.Net.Index
             {
                 return base.Size(info);
             }
-            return info.SizeInBytes();
+            return info.GetSizeInBytes();
         }
 
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/MergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/MergePolicy.cs b/src/Lucene.Net.Core/Index/MergePolicy.cs
index e6e5de1..8bf25cb 100644
--- a/src/Lucene.Net.Core/Index/MergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/MergePolicy.cs
@@ -690,7 +690,7 @@ namespace Lucene.Net.Index
         /// </summary>
         protected virtual long Size(SegmentCommitInfo info)
         {
-            long byteSize = info.SizeInBytes();
+            long byteSize = info.GetSizeInBytes();
             int delCount = m_writer.Get().NumDeletedDocs(info);
             double delRatio = (info.Info.DocCount <= 0 ? 0.0f : ((float)delCount / (float)info.Info.DocCount));
             Debug.Assert(delRatio <= 1.0);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs b/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
index 3cd1b6e..43c4c2d 100644
--- a/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
+++ b/src/Lucene.Net.Core/Index/PrefixCodedTerms.cs
@@ -44,12 +44,9 @@ namespace Lucene.Net.Index
         }
 
         /// <returns> size in bytes </returns>
-        public virtual long SizeInBytes
+        public virtual long GetSizeInBytes()
         {
-            get
-            {
-                return buffer.SizeInBytes;
-            }
+            return buffer.GetSizeInBytes();
         }
 
         /// <returns> iterator over the bytes </returns>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/SegmentCommitInfo.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/SegmentCommitInfo.cs b/src/Lucene.Net.Core/Index/SegmentCommitInfo.cs
index a102cec..4da94a5 100644
--- a/src/Lucene.Net.Core/Index/SegmentCommitInfo.cs
+++ b/src/Lucene.Net.Core/Index/SegmentCommitInfo.cs
@@ -155,7 +155,7 @@ namespace Lucene.Net.Index
         /// <p><b>NOTE:</b> this value is not correct for 3.0 segments
         /// that have shared docstores. To get the correct value, upgrade!
         /// </summary>
-        public virtual long SizeInBytes()
+        public virtual long GetSizeInBytes()
         {
             if (sizeInBytes == -1)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs b/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
index cd788db..391b3a3 100644
--- a/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
+++ b/src/Lucene.Net.Core/Index/TieredMergePolicy.cs
@@ -409,7 +409,7 @@ namespace Lucene.Net.Index
                     SegmentCommitInfo info = infosSorted[idx];
                     if (merging.Contains(info))
                     {
-                        mergingBytes += info.SizeInBytes();
+                        mergingBytes += info.GetSizeInBytes();
                     }
                     else if (!toBeMerged.Contains(info))
                     {
@@ -524,7 +524,7 @@ namespace Lucene.Net.Index
                 long segBytes = Size(info);
                 totAfterMergeBytes += segBytes;
                 totAfterMergeBytesFloored += FloorSize(segBytes);
-                totBeforeMergeBytes += info.SizeInBytes();
+                totBeforeMergeBytes += info.GetSizeInBytes();
             }
 
             // Roughly measure "skew" of the merge, i.e. how

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs b/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
index fc2a9f2..5c733f0 100644
--- a/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
+++ b/src/Lucene.Net.Core/Search/CachingWrapperFilter.cs
@@ -178,7 +178,7 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Returns total byte size used by cached filters. </summary>
-        public virtual long SizeInBytes()
+        public virtual long GetSizeInBytes()
         {            
             IList<DocIdSet> docIdSets = new List<DocIdSet>(_cache.Values);
             return docIdSets.Sum(dis => RamUsageEstimator.SizeOf(dis));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs b/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
index cbd57ca..3d42334 100644
--- a/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
+++ b/src/Lucene.Net.Core/Store/NRTCachingDirectory.cs
@@ -166,9 +166,9 @@ namespace Lucene.Net.Store
         /// Returns how many bytes are being used by the
         /// <see cref="RAMDirectory"/> cache
         /// </summary>
-        public virtual long SizeInBytes()
+        public virtual long GetSizeInBytes()
         {
-            return cache.SizeInBytes();
+            return cache.GetSizeInBytes();
         }
 
         [Obsolete("this method will be removed in 5.0")]
@@ -364,7 +364,7 @@ namespace Lucene.Net.Store
                 bytes = context.FlushInfo.EstimatedSegmentSize;
             }
 
-            return !name.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal) && (bytes <= maxMergeSizeBytes) && (bytes + cache.SizeInBytes()) <= maxCachedBytes;
+            return !name.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal) && (bytes <= maxMergeSizeBytes) && (bytes + cache.GetSizeInBytes()) <= maxCachedBytes;
         }
 
         private readonly object uncacheLock = new object();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Store/RAMDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/RAMDirectory.cs b/src/Lucene.Net.Core/Store/RAMDirectory.cs
index 2fbb86c..331fe8b 100644
--- a/src/Lucene.Net.Core/Store/RAMDirectory.cs
+++ b/src/Lucene.Net.Core/Store/RAMDirectory.cs
@@ -152,7 +152,7 @@ namespace Lucene.Net.Store
         /// Return total size in bytes of all files in this directory. This is
         /// currently quantized to <see cref="RAMOutputStream.BUFFER_SIZE"/>.
         /// </summary>
-        public long SizeInBytes()
+        public long GetSizeInBytes()
         {
             EnsureOpen();
             return m_sizeInBytes.Get();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Store/RAMFile.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/RAMFile.cs b/src/Lucene.Net.Core/Store/RAMFile.cs
index 68abcaa..1da3b5e 100644
--- a/src/Lucene.Net.Core/Store/RAMFile.cs
+++ b/src/Lucene.Net.Core/Store/RAMFile.cs
@@ -109,14 +109,11 @@ namespace Lucene.Net.Store
             return new byte[size];
         }
 
-        public virtual long SizeInBytes // LUCENENET TODO: API Change to GetSizeInBytes() and check consistency across API
+        public virtual long GetSizeInBytes()
         {
-            get
+            lock (this)
             {
-                lock (this)
-                {
-                    return m_sizeInBytes;
-                }
+                return m_sizeInBytes;
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Store/RAMOutputStream.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/RAMOutputStream.cs b/src/Lucene.Net.Core/Store/RAMOutputStream.cs
index 4697b81..1590b51 100644
--- a/src/Lucene.Net.Core/Store/RAMOutputStream.cs
+++ b/src/Lucene.Net.Core/Store/RAMOutputStream.cs
@@ -216,7 +216,7 @@ namespace Lucene.Net.Store
 
         /// <summary>
         /// Returns byte usage of all buffers. </summary>
-        public virtual long SizeInBytes() // LUCENENET TODO: API Change to GetSizeInBytes()
+        public virtual long GetSizeInBytes()
         {
             return (long)file.NumBuffers * (long)BUFFER_SIZE;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Util/Fst/Builder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/Builder.cs b/src/Lucene.Net.Core/Util/Fst/Builder.cs
index d87b3b3..418f724 100644
--- a/src/Lucene.Net.Core/Util/Fst/Builder.cs
+++ b/src/Lucene.Net.Core/Util/Fst/Builder.cs
@@ -584,9 +584,9 @@ namespace Lucene.Net.Util.Fst
 
         // LUCENENET specific: moved INode to Builder type
 
-        public virtual long FstSizeInBytes()
+        public virtual long GetFstSizeInBytes()
         {
-            return fst.SizeInBytes();
+            return fst.GetSizeInBytes();
         }
 
         // LUCENENET specific: Moved CompiledNode and UncompiledNode to Builder class

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Core/Util/Fst/FST.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/Fst/FST.cs b/src/Lucene.Net.Core/Util/Fst/FST.cs
index aabeab8..3319bc3 100644
--- a/src/Lucene.Net.Core/Util/Fst/FST.cs
+++ b/src/Lucene.Net.Core/Util/Fst/FST.cs
@@ -340,7 +340,7 @@ namespace Lucene.Net.Util.Fst
 
         /// <summary>
         /// Returns bytes used to represent the FST </summary>
-        public long SizeInBytes()
+        public long GetSizeInBytes()
         {
             long size = bytes.Position;
             if (packed)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Misc/Index/IndexSplitter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Misc/Index/IndexSplitter.cs b/src/Lucene.Net.Misc/Index/IndexSplitter.cs
index 92b3ba2..a8847fc 100644
--- a/src/Lucene.Net.Misc/Index/IndexSplitter.cs
+++ b/src/Lucene.Net.Misc/Index/IndexSplitter.cs
@@ -102,7 +102,7 @@ namespace Lucene.Net.Index
             for (int x = 0; x < Infos.Count; x++)
             {
                 SegmentCommitInfo info = Infos.Info(x);
-                string sizeStr = string.Format(CultureInfo.InvariantCulture, "{0:###,###.###}", info.SizeInBytes());
+                string sizeStr = string.Format(CultureInfo.InvariantCulture, "{0:###,###.###}", info.GetSizeInBytes());
                 Console.WriteLine(info.Info.Name + " " + sizeStr);
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
index a3c4457..74d1106 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
@@ -237,7 +237,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         /// Returns byte size of the underlying FST. </summary>
         public override long GetSizeInBytes()
         {
-            return fst == null ? 0 : fst.SizeInBytes();
+            return fst == null ? 0 : fst.GetSizeInBytes();
         }
 
         private void CopyDestTransitions(State from, State to, IList<Transition> transitions)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
index ead705a..a28007f 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
@@ -197,7 +197,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             {
                 return 0;
             }
-            return fst.SizeInBytes();
+            return fst.GetSizeInBytes();
         }
 
         private class AnalyzingComparer : IComparer<BytesRef>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
index 5dcce06..49eb6cb 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
@@ -316,12 +316,12 @@ namespace Lucene.Net.Search.Suggest.Fst
             long mem = RamUsageEstimator.ShallowSizeOf(this) + RamUsageEstimator.ShallowSizeOf(normalCompletion) + RamUsageEstimator.ShallowSizeOf(higherWeightsCompletion);
             if (normalCompletion != null)
             {
-                mem += normalCompletion.FST.SizeInBytes();
+                mem += normalCompletion.FST.GetSizeInBytes();
             }
             if (higherWeightsCompletion != null && (normalCompletion == null || normalCompletion.FST != higherWeightsCompletion.FST))
             {
                 // the fst should be shared between the 2 completion instances, don't count it twice
-                mem += higherWeightsCompletion.FST.SizeInBytes();
+                mem += higherWeightsCompletion.FST.GetSizeInBytes();
             }
             return mem;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs b/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
index a719954..5ef4114 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/WFSTCompletionLookup.cs
@@ -334,7 +334,7 @@ namespace Lucene.Net.Search.Suggest.Fst
         /// Returns byte size of the underlying FST. </summary>
         public override long GetSizeInBytes()
         {
-            return (fst == null) ? 0 : fst.SizeInBytes();
+            return (fst == null) ? 0 : fst.GetSizeInBytes();
         }
 
         public override long Count

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs b/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
index 6c0e00b..07089f4 100644
--- a/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
+++ b/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
@@ -58,10 +58,10 @@ namespace Lucene.Net.Index
                 Drink.Drink_e[] values = Enum.GetValues(typeof(Drink.Drink_e)).Cast<Drink.Drink_e>().ToArray();
                 // pick a random drink during the day
                 Drink.Drink_e drink = values[Random.Next(values.Length - 1)];
-                return (long)drink * info.SizeInBytes();
+                return (long)drink * info.GetSizeInBytes();
             }
 
-            return info.SizeInBytes();
+            return info.GetSizeInBytes();
         }
 
         private class Drink

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
index 3ea4443..43e6005 100644
--- a/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockDirectoryWrapper.cs
@@ -257,13 +257,13 @@ namespace Lucene.Net.Store
             }
         }
 
-        public long SizeInBytes()
+        public long GetSizeInBytes()
         {
             lock (this)
             {
                 if (m_input is RAMDirectory)
                 {
-                    return ((RAMDirectory)m_input).SizeInBytes();
+                    return ((RAMDirectory)m_input).GetSizeInBytes();
                 }
                 else
                 {
@@ -700,7 +700,7 @@ namespace Lucene.Net.Store
                     {
                         if (existing != null)
                         {
-                            ramdir.m_sizeInBytes.AddAndGet(-existing.SizeInBytes);
+                            ramdir.m_sizeInBytes.AddAndGet(-existing.GetSizeInBytes());
                             existing.directory = null;
                         }
                         ramdir.m_fileMap.Put(name, file);
@@ -835,12 +835,12 @@ namespace Lucene.Net.Store
                 {
                     if (!(m_input is RAMDirectory))
                     {
-                        return SizeInBytes();
+                        return GetSizeInBytes();
                     }
                     long size = 0;
                     foreach (RAMFile file in ((RAMDirectory)m_input).m_fileMap.Values)
                     {
-                        size += file.SizeInBytes;
+                        size += file.GetSizeInBytes();
                     }
                     return size;
                 }
@@ -862,7 +862,7 @@ namespace Lucene.Net.Store
                 {
                     if (!(m_input is RAMDirectory))
                     {
-                        return SizeInBytes();
+                        return GetSizeInBytes();
                     }
                     long size = 0;
                     foreach (RAMFile file in ((RAMDirectory)m_input).m_fileMap.Values)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs b/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
index ad61d71..1c935f3 100644
--- a/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
+++ b/src/Lucene.Net.TestFramework/Store/MockIndexOutputWrapper.cs
@@ -56,7 +56,7 @@ namespace Lucene.Net.Store
 
         private void CheckDiskFull(byte[] b, int offset, DataInput @in, long len)
         {
-            long freeSpace = Dir.MaxSize == 0 ? 0 : Dir.MaxSize - Dir.SizeInBytes();
+            long freeSpace = Dir.MaxSize == 0 ? 0 : Dir.MaxSize - Dir.GetSizeInBytes();
             long realUsage = 0;
 
             // Enforce disk full:

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
index 7c834d2..479f787 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterDelete.cs
@@ -584,7 +584,7 @@ namespace Lucene.Net.Index
             }
             writer.Dispose();
 
-            long diskUsage = startDir.SizeInBytes();
+            long diskUsage = startDir.GetSizeInBytes();
             long diskFree = diskUsage + 10;
 
             IOException err = null;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Index/TestIndexWriterOnDiskFull.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestIndexWriterOnDiskFull.cs b/src/Lucene.Net.Tests/Index/TestIndexWriterOnDiskFull.cs
index 3ff722e..c8c0d24 100644
--- a/src/Lucene.Net.Tests/Index/TestIndexWriterOnDiskFull.cs
+++ b/src/Lucene.Net.Tests/Index/TestIndexWriterOnDiskFull.cs
@@ -248,7 +248,7 @@ namespace Lucene.Net.Index
             // added.
 
             // String[] files = startDir.ListAll();
-            long diskUsage = startDir.SizeInBytes();
+            long diskUsage = startDir.GetSizeInBytes();
 
             long startDiskUsage = 0;
             string[] files_ = startDir.ListAll();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs b/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
index 724c37c..9379a32 100644
--- a/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
+++ b/src/Lucene.Net.Tests/Index/TestRollingUpdates.cs
@@ -176,7 +176,7 @@ namespace Lucene.Net.Index
             long totalBytes = 0;
             foreach (SegmentCommitInfo sipc in infos.Segments)
             {
-                totalBytes += sipc.SizeInBytes();
+                totalBytes += sipc.GetSizeInBytes();
             }
             long totalBytes2 = 0;
             foreach (string fileName in dir.ListAll())

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Index/TestSizeBoundedForceMerge.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Index/TestSizeBoundedForceMerge.cs b/src/Lucene.Net.Tests/Index/TestSizeBoundedForceMerge.cs
index dd066d5..8d5f463 100644
--- a/src/Lucene.Net.Tests/Index/TestSizeBoundedForceMerge.cs
+++ b/src/Lucene.Net.Tests/Index/TestSizeBoundedForceMerge.cs
@@ -80,7 +80,7 @@ namespace Lucene.Net.Index
 
             SegmentInfos sis = new SegmentInfos();
             sis.Read(dir);
-            double min = sis.Info(0).SizeInBytes();
+            double min = sis.Info(0).GetSizeInBytes();
 
             conf = NewWriterConfig();
             LogByteSizeMergePolicy lmp = new LogByteSizeMergePolicy();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Search/TestCachingWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Search/TestCachingWrapperFilter.cs b/src/Lucene.Net.Tests/Search/TestCachingWrapperFilter.cs
index d0bc1a7..f92dd19 100644
--- a/src/Lucene.Net.Tests/Search/TestCachingWrapperFilter.cs
+++ b/src/Lucene.Net.Tests/Search/TestCachingWrapperFilter.cs
@@ -389,7 +389,7 @@ namespace Lucene.Net.Search
             CachingWrapperFilter filter = new CachingWrapperFilter(startFilter);
 
             docs = searcher.Search(new MatchAllDocsQuery(), filter, 1);
-            Assert.IsTrue(filter.SizeInBytes() > 0);
+            Assert.IsTrue(filter.GetSizeInBytes() > 0);
 
             Assert.AreEqual(1, docs.TotalHits, "[query + filter] Should find a hit...");
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs b/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
index 3126ac8..e91d525 100644
--- a/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
+++ b/src/Lucene.Net.Tests/Store/TestRAMDirectory.cs
@@ -84,7 +84,7 @@ namespace Lucene.Net.Store
             dir.Dispose();
 
             // Check size
-            Assert.AreEqual(ramDir.SizeInBytes(), ramDir.RecomputedSizeInBytes);
+            Assert.AreEqual(ramDir.GetSizeInBytes(), ramDir.RecomputedSizeInBytes);
 
             // open reader to test document count
             IndexReader reader = DirectoryReader.Open(ramDir);
@@ -117,7 +117,7 @@ namespace Lucene.Net.Store
             IndexWriter writer = new IndexWriter(ramDir, (new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(Random()))).SetOpenMode(OpenMode.APPEND));
             writer.ForceMerge(1);
 
-            Assert.AreEqual(ramDir.SizeInBytes(), ramDir.RecomputedSizeInBytes);
+            Assert.AreEqual(ramDir.GetSizeInBytes(), ramDir.RecomputedSizeInBytes);
 
             ThreadClass[] threads = new ThreadClass[NumThreads];
             for (int i = 0; i < NumThreads; i++)
@@ -135,7 +135,7 @@ namespace Lucene.Net.Store
             }
 
             writer.ForceMerge(1);
-            Assert.AreEqual(ramDir.SizeInBytes(), ramDir.RecomputedSizeInBytes);
+            Assert.AreEqual(ramDir.GetSizeInBytes(), ramDir.RecomputedSizeInBytes);
 
             writer.Dispose();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs b/src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs
index efce2e5..212112a 100644
--- a/src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs
+++ b/src/Lucene.Net.Tests/Util/Fst/Test2BFST.cs
@@ -71,7 +71,7 @@ namespace Lucene.Net.Util.Fst
                         count++;
                         if (count % 100000 == 0)
                         {
-                            Console.WriteLine(count + ": " + b.FstSizeInBytes() + " bytes; " + b.TotStateCount + " nodes");
+                            Console.WriteLine(count + ": " + b.GetFstSizeInBytes() + " bytes; " + b.TotStateCount + " nodes");
                         }
                         if (b.TotStateCount > int.MaxValue + 100L * 1024 * 1024)
                         {
@@ -84,7 +84,7 @@ namespace Lucene.Net.Util.Fst
 
                     for (int verify = 0; verify < 2; verify++)
                     {
-                        Console.WriteLine("\nTEST: now verify [fst size=" + fst.SizeInBytes() + "; nodeCount=" + fst.NodeCount + "; arcCount=" + fst.ArcCount + "]");
+                        Console.WriteLine("\nTEST: now verify [fst size=" + fst.GetSizeInBytes() + "; nodeCount=" + fst.NodeCount + "; arcCount=" + fst.ArcCount + "]");
 
                         Arrays.Fill(ints2, 0);
                         r = new Random(seed);
@@ -164,9 +164,9 @@ namespace Lucene.Net.Util.Fst
                         count++;
                         if (count % 1000000 == 0)
                         {
-                            Console.WriteLine(count + "...: " + b.FstSizeInBytes() + " bytes");
+                            Console.WriteLine(count + "...: " + b.GetFstSizeInBytes() + " bytes");
                         }
-                        if (b.FstSizeInBytes() > LIMIT)
+                        if (b.GetFstSizeInBytes() > LIMIT)
                         {
                             break;
                         }
@@ -176,7 +176,7 @@ namespace Lucene.Net.Util.Fst
                     FST<BytesRef> fst = b.Finish();
                     for (int verify = 0; verify < 2; verify++)
                     {
-                        Console.WriteLine("\nTEST: now verify [fst size=" + fst.SizeInBytes() + "; nodeCount=" + fst.NodeCount + "; arcCount=" + fst.ArcCount + "]");
+                        Console.WriteLine("\nTEST: now verify [fst size=" + fst.GetSizeInBytes() + "; nodeCount=" + fst.NodeCount + "; arcCount=" + fst.ArcCount + "]");
 
                         r = new Random(seed);
                         Arrays.Fill(ints, 0);
@@ -250,9 +250,9 @@ namespace Lucene.Net.Util.Fst
                         count++;
                         if (count % 1000000 == 0)
                         {
-                            Console.WriteLine(count + "...: " + b.FstSizeInBytes() + " bytes");
+                            Console.WriteLine(count + "...: " + b.GetFstSizeInBytes() + " bytes");
                         }
-                        if (b.FstSizeInBytes() > LIMIT)
+                        if (b.GetFstSizeInBytes() > LIMIT)
                         {
                             break;
                         }
@@ -263,7 +263,7 @@ namespace Lucene.Net.Util.Fst
 
                     for (int verify = 0; verify < 2; verify++)
                     {
-                        Console.WriteLine("\nTEST: now verify [fst size=" + fst.SizeInBytes() + "; nodeCount=" + fst.NodeCount + "; arcCount=" + fst.ArcCount + "]");
+                        Console.WriteLine("\nTEST: now verify [fst size=" + fst.GetSizeInBytes() + "; nodeCount=" + fst.NodeCount + "; arcCount=" + fst.ArcCount + "]");
 
                         Arrays.Fill(ints, 0);
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/b6dcfe8a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
index 94f8afd..a9b0556 100644
--- a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
+++ b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
@@ -431,7 +431,7 @@ namespace Lucene.Net.Util.Fst
                 FST<long?> fst = builder.Finish();
                 if (VERBOSE)
                 {
-                    Console.WriteLine("FST: " + docCount + " docs; " + ord + " terms; " + fst.NodeCount + " nodes; " + fst.ArcCount + " arcs;" + " " + fst.SizeInBytes() + " bytes");
+                    Console.WriteLine("FST: " + docCount + " docs; " + ord + " terms; " + fst.NodeCount + " nodes; " + fst.ArcCount + " arcs;" + " " + fst.GetSizeInBytes() + " bytes");
                 }
 
                 if (ord > 0)
@@ -596,7 +596,7 @@ namespace Lucene.Net.Util.Fst
                         return;
                     }
 
-                    Console.WriteLine(ord + " terms; " + fst.NodeCount + " nodes; " + fst.ArcCount + " arcs; " + fst.ArcWithOutputCount + " arcs w/ output; tot size " + fst.SizeInBytes());
+                    Console.WriteLine(ord + " terms; " + fst.NodeCount + " nodes; " + fst.ArcCount + " arcs; " + fst.ArcWithOutputCount + " arcs w/ output; tot size " + fst.GetSizeInBytes());
                     if (fst.NodeCount < 100)
                     {
                         TextWriter w = new StreamWriter(new FileStream("out.dot", FileMode.Create), Encoding.UTF8);


Mime
View raw message