Class StringSort
java.lang.Object
org.apache.jackrabbit.oak.commons.sort.StringSort
- All Implemented Interfaces:
Closeable,AutoCloseable,Iterable<String>
Utility class to store a list of string and perform sort on that. For small size
the list would be maintained in memory. If the size crosses the required threshold then
the sorting would be performed externally
-
Field Details
-
BATCH_SIZE
public static final int BATCH_SIZE- See Also:
-
-
Constructor Details
-
StringSort
-
-
Method Details
-
add
- Throws:
IOException
-
sort
- Throws:
IOException
-
getIds
- Throws:
IOException
-
getSize
public long getSize() -
isEmpty
public boolean isEmpty() -
usingFile
public boolean usingFile() -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
iterator
-