org.apache.lucene.facet.search
public class FacetArrays extends Object
int[] or float[] of the specified array length. When the
arrays are no longer needed, you should call free(), so that e.g.
they will be reclaimed.
NOTE: if you need to reuse the allocated arrays between search
requests, use ReusingFacetArrays.
NOTE: this class is not thread safe. You typically allocate it per search.
| Modifier and Type | Field and Description |
|---|---|
int |
arrayLength |
| Constructor and Description |
|---|
FacetArrays(int arrayLength)
Arrays will be allocated at the specified length.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
doFree(float[] floats,
int[] ints) |
void |
free()
Notifies that the arrays obtained from
getIntArray()
or getFloatArray() are no longer needed and can be freed. |
float[] |
getFloatArray() |
int[] |
getIntArray() |
protected float[] |
newFloatArray() |
protected int[] |
newIntArray() |
public FacetArrays(int arrayLength)
protected float[] newFloatArray()
protected int[] newIntArray()
protected void doFree(float[] floats,
int[] ints)
public final void free()
getIntArray()
or getFloatArray() are no longer needed and can be freed.public final int[] getIntArray()
public final float[] getFloatArray()
Copyright © 2000-2014 Apache Software Foundation. All Rights Reserved.