|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lucene.search.suggest.fst.Sort
public final class Sort
On-disk sorting of byte arrays. Each byte array (entry) is a composed of the following fields:
sort(File, File)
Nested Class Summary | |
---|---|
static class |
Sort.BufferSize
A bit more descriptive unit for constructors. |
static class |
Sort.ByteSequencesReader
Utility class to read length-prefixed byte[] entries from an input. |
static class |
Sort.ByteSequencesWriter
Utility class to emit length-prefixed byte[] entries to an output stream for sorting. |
class |
Sort.SortInfo
Sort info (debugging mostly). |
Field Summary | |
---|---|
static int |
ABSOLUTE_MIN_SORT_BUFFER_SIZE
Absolute minimum required buffer size for sorting. |
static Comparator<BytesRef> |
DEFAULT_COMPARATOR
|
static int |
GB
|
static int |
MAX_TEMPFILES
Maximum number of temporary files before doing an intermediate merge. |
static int |
MB
|
static int |
MIN_BUFFER_SIZE_MB
Minimum recommended buffer size for sorting. |
Constructor Summary | |
---|---|
Sort()
Defaults constructor. |
|
Sort(Comparator<BytesRef> comparator)
|
|
Sort(Comparator<BytesRef> comparator,
Sort.BufferSize ramBufferSize,
File tempDirectory,
int maxTempfiles)
All-details constructor. |
Method Summary | |
---|---|
static File |
defaultTempDir()
Returns the default temporary directory. |
Comparator<BytesRef> |
getComparator()
|
Sort.SortInfo |
sort(File input,
File output)
Sort input to output, explicit hint for the buffer size. |
protected File |
sortPartition(int len)
Sort a single partition in-memory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MB
public static final int GB
public static final int MIN_BUFFER_SIZE_MB
public static final int ABSOLUTE_MIN_SORT_BUFFER_SIZE
public static final int MAX_TEMPFILES
public static final Comparator<BytesRef> DEFAULT_COMPARATOR
Constructor Detail |
---|
public Sort() throws IOException
IOException
defaultTempDir()
,
Sort.BufferSize.automatic()
public Sort(Comparator<BytesRef> comparator) throws IOException
IOException
public Sort(Comparator<BytesRef> comparator, Sort.BufferSize ramBufferSize, File tempDirectory, int maxTempfiles)
Method Detail |
---|
public Sort.SortInfo sort(File input, File output) throws IOException
IOException
public static File defaultTempDir() throws IOException
IOException
protected File sortPartition(int len) throws IOException
IOException
public Comparator<BytesRef> getComparator()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |