示例#1
0
 public BytesRefIteratorAnonymousInnerClassHelper(BytesRefArray outerInstance, IComparer <BytesRef> comp, BytesRef spare, int size, int[] indices)
 {
     this.outerInstance = outerInstance;
     this.comp          = comp;
     this.spare         = spare;
     this.size          = size;
     this.indices       = indices;
     pos = 0;
 }
示例#2
0
 public IntroSorterAnonymousInnerClassHelper(BytesRefArray outerInstance, IComparer <BytesRef> comp, int[] orderedEntries)
 {
     this.outerInstance  = outerInstance;
     this.comp           = comp;
     this.orderedEntries = orderedEntries;
     pivot    = new BytesRef();
     scratch1 = new BytesRef();
     scratch2 = new BytesRef();
 }
示例#3
0
 public Enumerator(BytesRefArray bytesRefArray, IComparer <BytesRef> comparer, int size, int[] indices)
 {
     this.spare         = new BytesRef();
     this.pos           = 0;
     this.Current       = null;
     this.bytesRefArray = bytesRefArray;
     this.comparer      = comparer;
     this.size          = size;
     this.indices       = indices;
 }
示例#4
0
        /// <summary>
        /// All-details constructor.
        /// </summary>
#pragma warning disable IDE0060 // Remove unused parameter
        public OfflineSorter(IComparer <BytesRef> comparer, BufferSize ramBufferSize, DirectoryInfo tempDirectory, int maxTempfiles)
#pragma warning restore IDE0060 // Remove unused parameter
        {
            buffer = new BytesRefArray(bufferBytesUsed);
            if (ramBufferSize.bytes < ABSOLUTE_MIN_SORT_BUFFER_SIZE)
            {
                throw new ArgumentException(MIN_BUFFER_SIZE_MSG + ": " + ramBufferSize.bytes);
            }

            if (maxTempfiles < 2)
            {
                throw new ArgumentException("maxTempFiles must be >= 2");
            }

            this.ramBufferSize = ramBufferSize;
            this.maxTempFiles  = maxTempfiles;
            this.comparer      = comparer;
        }
示例#5
0
        /// <summary>
        /// All-details constructor.
        /// </summary>
#pragma warning disable IDE0060 // Remove unused parameter
        public OfflineSorter(IComparer <BytesRef> comparer, BufferSize ramBufferSize, DirectoryInfo tempDirectory, int maxTempfiles)
#pragma warning restore IDE0060 // Remove unused parameter
        {
            buffer = new BytesRefArray(bufferBytesUsed);
            if (ramBufferSize.bytes < ABSOLUTE_MIN_SORT_BUFFER_SIZE)
            {
                throw new ArgumentException(MIN_BUFFER_SIZE_MSG + ": " + ramBufferSize.bytes);
            }

            if (maxTempfiles < 2)
            {
                throw new ArgumentOutOfRangeException(nameof(maxTempfiles), "maxTempFiles must be >= 2"); // LUCENENET specific - changed from IllegalArgumentException to ArgumentOutOfRangeException (.NET convention)
            }

            this.ramBufferSize = ramBufferSize;
            this.maxTempFiles  = maxTempfiles;
            this.comparer      = comparer;
        }
示例#6
0
 private void InitializeInstanceFields()
 {
     buffer = new BytesRefArray(bufferBytesUsed);
 }