Module org.apache.lucene.memory
Package org.apache.lucene.index.memory
Class MemoryIndex.SlicedIntBlockPool
- java.lang.Object
-
- org.apache.lucene.util.IntBlockPool
-
- org.apache.lucene.index.memory.MemoryIndex.SlicedIntBlockPool
-
- Enclosing class:
- MemoryIndex
static class MemoryIndex.SlicedIntBlockPool extends IntBlockPool
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static class
MemoryIndex.SlicedIntBlockPool.SliceReader
AMemoryIndex.SlicedIntBlockPool.SliceReader
that can read int slices written by aMemoryIndex.SlicedIntBlockPool.SliceWriter
(package private) static class
MemoryIndex.SlicedIntBlockPool.SliceWriter
AMemoryIndex.SlicedIntBlockPool.SliceWriter
that allows to write multiple integer slices into a givenIntBlockPool
.-
Nested classes/interfaces inherited from class org.apache.lucene.util.IntBlockPool
IntBlockPool.Allocator, IntBlockPool.DirectAllocator
-
-
Field Summary
Fields Modifier and Type Field Description private static int
FIRST_LEVEL_SIZE
The first level size for new slicesprivate static int[]
LEVEL_SIZE_ARRAY
An array holding the level sizes for int slices.private static int[]
NEXT_LEVEL_ARRAY
An array holding the offset into theLEVEL_SIZE_ARRAY
to quickly navigate to the next slice level.-
Fields inherited from class org.apache.lucene.util.IntBlockPool
buffer, buffers, INT_BLOCK_MASK, INT_BLOCK_SHIFT, INT_BLOCK_SIZE, intOffset, intUpto
-
-
Constructor Summary
Constructors Constructor Description SlicedIntBlockPool(IntBlockPool.Allocator allocator)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
allocSlice(int[] slice, int sliceOffset)
Allocates a new slice from the given offsetprivate static boolean
assertSliceBuffer(int[] buffer)
private int
newSlice(int size)
Creates a new int slice with the given starting size and returns the slices offset in the pool.-
Methods inherited from class org.apache.lucene.util.IntBlockPool
nextBuffer, reset
-
-
-
-
Field Detail
-
NEXT_LEVEL_ARRAY
private static final int[] NEXT_LEVEL_ARRAY
An array holding the offset into theLEVEL_SIZE_ARRAY
to quickly navigate to the next slice level.
-
LEVEL_SIZE_ARRAY
private static final int[] LEVEL_SIZE_ARRAY
An array holding the level sizes for int slices.
-
FIRST_LEVEL_SIZE
private static final int FIRST_LEVEL_SIZE
The first level size for new slices
-
-
Constructor Detail
-
SlicedIntBlockPool
SlicedIntBlockPool(IntBlockPool.Allocator allocator)
-
-
Method Detail
-
newSlice
private int newSlice(int size)
Creates a new int slice with the given starting size and returns the slices offset in the pool.
-
assertSliceBuffer
private static boolean assertSliceBuffer(int[] buffer)
-
allocSlice
private int allocSlice(int[] slice, int sliceOffset)
Allocates a new slice from the given offset
-
-