lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [14/37] lucenenet git commit: Lucene.Net.Core.BlockTerms.FixedGapTermsIndexReader.FieldIndexData.CoreFieldIndex refactor: RamBytesUsed > RamBytesUsed()
Date Sun, 29 Jan 2017 13:27:36 GMT
Lucene.Net.Core.BlockTerms.FixedGapTermsIndexReader.FieldIndexData.CoreFieldIndex refactor:
RamBytesUsed > RamBytesUsed()


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

Branch: refs/heads/api-work
Commit: 0ad5d6ffdb3714de31daf053aec7ea7ece22c7cb
Parents: f50b035
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Jan 29 15:27:04 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Jan 29 17:10:21 2017 +0700

----------------------------------------------------------------------
 .../BlockTerms/FixedGapTermsIndexReader.cs             | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ad5d6ff/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
index 01813cf..7a1750d 100644
--- a/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
+++ b/src/Lucene.Net.Codecs/BlockTerms/FixedGapTermsIndexReader.cs
@@ -331,7 +331,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                         _numIndexTerms, outerInstance);
             }
 
-            internal class CoreFieldIndex
+            internal sealed class CoreFieldIndex
             {
                 /// <summary>
                 /// Where this fields term begin in the packed byte[] data
@@ -474,13 +474,10 @@ namespace Lucene.Net.Codecs.BlockTerms
                 }
 
                 /// <summary>Returns approximate RAM bytes Used</summary>
-                public long RamBytesUsed // LUCENENET TODO: Make RamBytesUsed()
+                public long RamBytesUsed()
                 {
-                    get
-                    {
-                        return ((TermOffsets != null) ? TermOffsets.RamBytesUsed() : 0) +
-                               ((TermsDictOffsets != null) ? TermsDictOffsets.RamBytesUsed()
: 0);
-                    }
+                    return ((TermOffsets != null) ? TermOffsets.RamBytesUsed() : 0) +
+                            ((TermsDictOffsets != null) ? TermsDictOffsets.RamBytesUsed()
: 0);
                 }
             }
         }
@@ -522,7 +519,7 @@ namespace Lucene.Net.Codecs.BlockTerms
                                 ((_termBytesReader != null) ? _termBytesReader.RamBytesUsed()
: 0);
 
             return _fields.Values.Aggregate(sizeInBytes,
-                (current, entry) => (current + entry.CoreIndex.RamBytesUsed));
+                (current, entry) => (current + entry.CoreIndex.RamBytesUsed()));
         }
     }
 }
\ No newline at end of file


Mime
View raw message