lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [14/23] lucenenet git commit: Lucene.Net.Codecs.Sep.IntIndexInput: Renamed AbstractIndex > Index, AbstractReader > Reader
Date Sun, 19 Mar 2017 23:20:09 GMT
Lucene.Net.Codecs.Sep.IntIndexInput: Renamed AbstractIndex > Index, AbstractReader >
Reader


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

Branch: refs/heads/api-work
Commit: 90bfa65a689a0d466ed1250c5a5f692d5706d1b9
Parents: 070cfa3
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Mar 19 23:12:35 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Mar 19 23:12:35 2017 +0700

----------------------------------------------------------------------
 .../IntBlock/FixedIntBlockIndexInput.cs         | 14 ++++----
 .../IntBlock/VariableIntBlockIndexInput.cs      | 14 ++++----
 src/Lucene.Net.Codecs/Sep/IntIndexInput.cs      | 14 ++++----
 src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs  | 34 ++++++++++----------
 src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs  | 30 ++++++++---------
 src/Lucene.Net.Core/Store/RAMFile.cs            |  2 +-
 .../Codecs/MockSep/MockSingleIntIndexInput.cs   | 14 ++++----
 .../IntBlock/TestIntBlockCodec.cs               |  2 +-
 8 files changed, 62 insertions(+), 62 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
index 39db619..3bc02b5 100644
--- a/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/FixedIntBlockIndexInput.cs
@@ -47,7 +47,7 @@ namespace Lucene.Net.Codecs.IntBlock
             m_blockSize = @in.ReadVInt32();
         }
 
-        public override AbstractReader GetReader()
+        public override Int32IndexInput.Reader GetReader()
         {
             var buffer = new int[m_blockSize];
             var clone = (IndexInput)input.Clone();
@@ -60,7 +60,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override AbstractIndex GetIndex()
+        public override Int32IndexInput.Index GetIndex()
         {
             return new Index(this);
         }
@@ -79,7 +79,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void ReadBlock();
         }
 
-        private class Reader : AbstractReader
+        new private class Reader : Int32IndexInput.Reader
         {
             private readonly IndexInput input;
             private readonly IBlockReader blockReader;
@@ -132,7 +132,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class Index : AbstractIndex
+        new private class Index : Int32IndexInput.Index
         {
             private readonly FixedInt32BlockIndexInput outerInstance;
 
@@ -169,19 +169,19 @@ namespace Lucene.Net.Codecs.IntBlock
                 Debug.Assert(upto < outerInstance.m_blockSize);
             }
 
-            public override void Seek(AbstractReader other)
+            public override void Seek(Int32IndexInput.Reader other)
             {
                 ((Reader)other).Seek(fp, upto);
             }
 
-            public override void CopyFrom(AbstractIndex other)
+            public override void CopyFrom(Int32IndexInput.Index other)
             {
                 Index idx = (Index)other;
                 fp = idx.fp;
                 upto = idx.upto;
             }
 
-            public override AbstractIndex Clone()
+            public override object Clone()
             {
                 Index other = new Index(outerInstance);
                 other.fp = fp;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
index 3074a3a..a1864bc 100644
--- a/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
+++ b/src/Lucene.Net.Codecs/IntBlock/VariableIntBlockIndexInput.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Codecs.IntBlock
             m_maxBlockSize = input.ReadInt32();
         }
 
-        public override AbstractReader GetReader()
+        public override Int32IndexInput.Reader GetReader()
         {
             var buffer = new int[m_maxBlockSize];
             var clone = (IndexInput)input.Clone();
@@ -64,7 +64,7 @@ namespace Lucene.Net.Codecs.IntBlock
             input.Dispose();
         }
 
-        public override AbstractIndex GetIndex()
+        public override Int32IndexInput.Index GetIndex()
         {
             return new Index(this);
         }
@@ -83,7 +83,7 @@ namespace Lucene.Net.Codecs.IntBlock
             void Seek(long pos);
         }
 
-        private class Reader : AbstractReader
+        new private class Reader : Int32IndexInput.Reader
         {
             private readonly IndexInput input;
 
@@ -165,7 +165,7 @@ namespace Lucene.Net.Codecs.IntBlock
             }
         }
 
-        private class Index : AbstractIndex
+        new private class Index : Int32IndexInput.Index
         {
             private readonly VariableInt32BlockIndexInput outerInstance;
 
@@ -209,19 +209,19 @@ namespace Lucene.Net.Codecs.IntBlock
                 return "VarIntBlock.Index fp=" + fp + " upto=" + upto + " maxBlock=" + outerInstance.m_maxBlockSize;
             }
 
-            public override void Seek(AbstractReader other)
+            public override void Seek(Int32IndexInput.Reader other)
             {
                 ((Reader)other).Seek(fp, upto);
             }
 
-            public override void CopyFrom(AbstractIndex other)
+            public override void CopyFrom(Int32IndexInput.Index other)
             {
                 Index idx = (Index)other;
                 fp = idx.fp;
                 upto = idx.upto;
             }
 
-            public override AbstractIndex Clone()
+            public override object Clone()
             {
                 Index other = new Index(outerInstance);
                 other.fp = fp;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
index b56661f..70ea8cf 100644
--- a/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
+++ b/src/Lucene.Net.Codecs/Sep/IntIndexInput.cs
@@ -31,26 +31,26 @@ namespace Lucene.Net.Codecs.Sep
     /// </summary>
     public abstract class Int32IndexInput : IDisposable
     {
-        public abstract AbstractReader GetReader();
+        public abstract Reader GetReader();
         public abstract void Dispose();
-        public abstract AbstractIndex GetIndex();
+        public abstract Index GetIndex();
 
         /// <summary>
         /// Records a single skip-point in the <see cref="Int32IndexInput.GetReader"/>.
</summary>
-        public abstract class AbstractIndex // LUCENENET TODO: API Change back to Index ?
Or make interface so names don't collide?
+        public abstract class Index
         {
             public abstract void Read(DataInput indexIn, bool absolute);
 
             /// <summary>Seeks primary stream to the last read offset </summary>
-            public abstract void Seek(AbstractReader stream);
+            public abstract void Seek(Reader stream);
 
-            public abstract void CopyFrom(AbstractIndex other);
+            public abstract void CopyFrom(Index other);
 
-            public abstract AbstractIndex Clone();
+            public abstract object Clone();
         }
 
         /// <summary>Reads int values</summary>
-        public abstract class AbstractReader // LUCENENET TODO: Change back to Reader ? Or
make interface so names don't collide?
+        public abstract class Reader
         {
             /// <summary>Reads next single int</summary>
             public abstract int Next();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
index 20f25e5..47298ab 100644
--- a/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepPostingsReader.cs
@@ -108,9 +108,9 @@ namespace Lucene.Net.Codecs.Sep
             // We store only the seek point to the docs file because
             // the rest of the info (freqIndex, posIndex, etc.) is
             // stored in the docs file:
-            internal Int32IndexInput.AbstractIndex docIndex;
-            internal Int32IndexInput.AbstractIndex posIndex;
-            internal Int32IndexInput.AbstractIndex freqIndex;
+            internal Int32IndexInput.Index docIndex;
+            internal Int32IndexInput.Index posIndex;
+            internal Int32IndexInput.Index freqIndex;
             internal long payloadFP;
             internal long skipFP;
 
@@ -127,7 +127,7 @@ namespace Lucene.Net.Codecs.Sep
                 SepTermState other_ = (SepTermState)other;
                 if (docIndex == null)
                 {
-                    docIndex = other_.docIndex.Clone();
+                    docIndex = (Int32IndexInput.Index)other_.docIndex.Clone();
                 }
                 else
                 {
@@ -137,7 +137,7 @@ namespace Lucene.Net.Codecs.Sep
                 {
                     if (freqIndex == null)
                     {
-                        freqIndex = other_.freqIndex.Clone();
+                        freqIndex = (Int32IndexInput.Index)other_.freqIndex.Clone();
                     }
                     else
                     {
@@ -152,7 +152,7 @@ namespace Lucene.Net.Codecs.Sep
                 {
                     if (posIndex == null)
                     {
-                        posIndex = other_.posIndex.Clone();
+                        posIndex = (Int32IndexInput.Index)other_.posIndex.Clone();
                     }
                     else
                     {
@@ -301,13 +301,13 @@ namespace Lucene.Net.Codecs.Sep
             private IndexOptions indexOptions;
             private bool storePayloads;
             private IBits liveDocs;
-            private readonly Int32IndexInput.AbstractReader docReader;
-            private readonly Int32IndexInput.AbstractReader freqReader;
+            private readonly Int32IndexInput.Reader docReader;
+            private readonly Int32IndexInput.Reader freqReader;
             private long skipFP;
 
-            private readonly Int32IndexInput.AbstractIndex docIndex;
-            private readonly Int32IndexInput.AbstractIndex freqIndex;
-            private readonly Int32IndexInput.AbstractIndex posIndex;
+            private readonly Int32IndexInput.Index docIndex;
+            private readonly Int32IndexInput.Index freqIndex;
+            private readonly Int32IndexInput.Index posIndex;
             internal readonly Int32IndexInput startDocIn;
 
             // TODO: -- should we do hasProx with 2 different enum classes?
@@ -492,15 +492,15 @@ namespace Lucene.Net.Codecs.Sep
 
             private bool storePayloads;
             private IBits liveDocs;
-            private readonly Int32IndexInput.AbstractReader docReader;
-            private readonly Int32IndexInput.AbstractReader freqReader;
-            private readonly Int32IndexInput.AbstractReader posReader;
+            private readonly Int32IndexInput.Reader docReader;
+            private readonly Int32IndexInput.Reader freqReader;
+            private readonly Int32IndexInput.Reader posReader;
             private readonly IndexInput payloadIn;
             private long skipFP;
 
-            private readonly Int32IndexInput.AbstractIndex docIndex;
-            private readonly Int32IndexInput.AbstractIndex freqIndex;
-            private readonly Int32IndexInput.AbstractIndex posIndex;
+            private readonly Int32IndexInput.Index docIndex;
+            private readonly Int32IndexInput.Index freqIndex;
+            private readonly Int32IndexInput.Index posIndex;
             internal readonly Int32IndexInput startDocIn;
 
             private long payloadFP;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
index a25c223..1b2a737 100644
--- a/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
+++ b/src/Lucene.Net.Codecs/Sep/SepSkipListReader.cs
@@ -33,15 +33,15 @@ namespace Lucene.Net.Codecs.Sep
     internal class SepSkipListReader : MultiLevelSkipListReader
     {
         private bool _currentFieldStoresPayloads;
-        private readonly Int32IndexInput.AbstractIndex[] _freqIndex;
-        private readonly Int32IndexInput.AbstractIndex[] _docIndex;
-        private readonly Int32IndexInput.AbstractIndex[] _posIndex;
+        private readonly Int32IndexInput.Index[] _freqIndex;
+        private readonly Int32IndexInput.Index[] _docIndex;
+        private readonly Int32IndexInput.Index[] _posIndex;
         private readonly long[] _payloadPointer;
         private readonly int[] _payloadLength;
 
-        private readonly Int32IndexInput.AbstractIndex _lastFreqIndex;
-        private readonly Int32IndexInput.AbstractIndex _lastDocIndex;
-        private readonly Int32IndexInput.AbstractIndex _lastPosIndex;
+        private readonly Int32IndexInput.Index _lastFreqIndex;
+        private readonly Int32IndexInput.Index _lastDocIndex;
+        private readonly Int32IndexInput.Index _lastPosIndex;
 
         private long _lastPayloadPointer;
         private int _lastPayloadLength;
@@ -52,12 +52,12 @@ namespace Lucene.Net.Codecs.Sep
         {
             if (freqIn != null)
             {
-                _freqIndex = new Int32IndexInput.AbstractIndex[maxSkipLevels];
+                _freqIndex = new Int32IndexInput.Index[maxSkipLevels];
             }
-            _docIndex = new Int32IndexInput.AbstractIndex[maxSkipLevels];
+            _docIndex = new Int32IndexInput.Index[maxSkipLevels];
             if (posIn != null)
             {
-                _posIndex = new Int32IndexInput.AbstractIndex[m_maxNumberOfSkipLevels];
+                _posIndex = new Int32IndexInput.Index[m_maxNumberOfSkipLevels];
             }
 
             for (var i = 0; i < maxSkipLevels; i++)
@@ -91,9 +91,9 @@ namespace Lucene.Net.Codecs.Sep
         }
 
         internal virtual void Init(long skipPointer, 
-            Int32IndexInput.AbstractIndex docBaseIndex, 
-            Int32IndexInput.AbstractIndex freqBaseIndex,
-            Int32IndexInput.AbstractIndex posBaseIndex, 
+            Int32IndexInput.Index docBaseIndex, 
+            Int32IndexInput.Index freqBaseIndex,
+            Int32IndexInput.Index posBaseIndex, 
             long payloadBasePointer, 
             int df, 
             bool storesPayloads)
@@ -176,17 +176,17 @@ namespace Lucene.Net.Codecs.Sep
             }
         }
 
-        internal virtual Int32IndexInput.AbstractIndex FreqIndex
+        internal virtual Int32IndexInput.Index FreqIndex
         {
             get { return _lastFreqIndex; }
         }
 
-        internal virtual Int32IndexInput.AbstractIndex PosIndex
+        internal virtual Int32IndexInput.Index PosIndex
         {
             get { return _lastPosIndex; }
         }
 
-        internal virtual Int32IndexInput.AbstractIndex DocIndex
+        internal virtual Int32IndexInput.Index DocIndex
         {
             get { return _lastDocIndex; }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/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 eff95b0..cc8e87e 100644
--- a/src/Lucene.Net.Core/Store/RAMFile.cs
+++ b/src/Lucene.Net.Core/Store/RAMFile.cs
@@ -75,7 +75,7 @@ namespace Lucene.Net.Store
             return buffer;
         }
 
-        protected internal byte[] GetBuffer(int index) // LUCENENET TODO: API Make Buffer[]
property
+        protected internal byte[] GetBuffer(int index)
         {
             lock (this)
             {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
index a750735..135ab27 100644
--- a/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
+++ b/src/Lucene.Net.TestFramework/Codecs/MockSep/MockSingleIntIndexInput.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Codecs.MockSep
                           MockSingleIntIndexOutput.VERSION_START);
         }
 
-        public override AbstractReader GetReader()
+        public override Reader GetReader()
         {
             return new MockReader((IndexInput)@in.Clone());
         }
@@ -53,7 +53,7 @@ namespace Lucene.Net.Codecs.MockSep
         /**
          * Just reads a vInt directly from the file.
          */
-        public class MockReader : AbstractReader
+        public class MockReader : Reader
         {
             // clone:
             internal readonly IndexInput @in;
@@ -71,7 +71,7 @@ namespace Lucene.Net.Codecs.MockSep
             }
         }
 
-        internal class MockSingleIntIndexInputIndex : AbstractIndex
+        internal class MockSingleIntIndexInputIndex : Index
         {
             private long fp;
 
@@ -87,12 +87,12 @@ namespace Lucene.Net.Codecs.MockSep
                 }
             }
 
-            public override void CopyFrom(AbstractIndex other)
+            public override void CopyFrom(Index other)
             {
                 fp = ((MockSingleIntIndexInputIndex)other).fp;
             }
 
-            public override void Seek(AbstractReader other)
+            public override void Seek(Reader other)
             {
                 ((MockReader)other).@in.Seek(fp);
             }
@@ -103,14 +103,14 @@ namespace Lucene.Net.Codecs.MockSep
             }
 
 
-            public override AbstractIndex Clone()
+            public override object Clone()
             {
                 MockSingleIntIndexInputIndex other = new MockSingleIntIndexInputIndex();
                 other.fp = fp;
                 return other;
             }
         }
-        public override AbstractIndex GetIndex()
+        public override Index GetIndex()
         {
             return new MockSingleIntIndexInputIndex();
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/90bfa65a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
index b7f6134..9959b69 100644
--- a/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
+++ b/src/Lucene.Net.Tests.Codecs/IntBlock/TestIntBlockCodec.cs
@@ -41,7 +41,7 @@ namespace Lucene.Net.Codecs.IntBlock
             @out.Dispose();
 
             Int32IndexInput @in = f.OpenInput(dir, "test", NewIOContext(Random()));
-            Int32IndexInput.AbstractReader r = @in.GetReader();
+            Int32IndexInput.Reader r = @in.GetReader();
 
             for (int i = 0; i < 11777; i++)
             {


Mime
View raw message