org.apache.lucene.facet.search
Class FacetArrays
java.lang.Object
org.apache.lucene.facet.search.FacetArrays
- Direct Known Subclasses:
- ReusingFacetArrays
public class FacetArrays
- extends Object
Provider of arrays used for facets aggregation. Returns either an
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.
- WARNING: This API is experimental and might change in incompatible ways in the next release.
Constructor Summary |
FacetArrays(int arrayLength)
Arrays will be allocated at the specified length. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
arrayLength
public final int arrayLength
FacetArrays
public FacetArrays(int arrayLength)
- Arrays will be allocated at the specified length.
newFloatArray
protected float[] newFloatArray()
newIntArray
protected int[] newIntArray()
doFree
protected void doFree(float[] floats,
int[] ints)
free
public final void free()
- Notifies that the arrays obtained from
getIntArray()
or getFloatArray()
are no longer needed and can be freed.
getIntArray
public final int[] getIntArray()
getFloatArray
public final float[] getFloatArray()
Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.