|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SortingState
Interface that defines how calling application can interact with a Sorter; both
by accessing progress information and by requesting cancellation if necessary.
It is implemented by Sorter.
| Nested Class Summary | |
|---|---|
static class |
SortingState.Phase
Different phases that sorter goes through |
| Method Summary | |
|---|---|
void |
cancel()
Method that can be used to try to cancel executing sort operation. |
void |
cancel(IOException e)
Method that can be used to try to cancel executing sort operation. |
void |
cancel(RuntimeException e)
Method that can be used to try to cancel executing sort operation. |
int |
getNumberOfPreSortFiles()
Accessor for checking how many pre-sort files were created during pre-sort phase. |
int |
getNumberOfSortRounds()
Accessor for figuring out how many regular sorting rounds need to be taken to complete sorting, if known. |
SortingState.Phase |
getPhase()
|
int |
getSortRound()
Accessor for checking which sorting round sorter is doing: for pre-sort it basically means number of segment (0-based) that is being processed in-memory, for regular sort it is number of (0-based) sorting round. |
boolean |
isCompleted()
Accessor for determining whether sorting has been succesfully completed or not. |
boolean |
isPreSorting()
Accessor for determining whether sorter is in its in-memory pre-sorting phase. |
boolean |
isSorting()
Accessor for determining whether sorter is in regular merge-sort phase or not. |
| Method Detail |
|---|
SortingState.Phase getPhase()
boolean isPreSorting()
boolean isSorting()
boolean isCompleted()
int getNumberOfPreSortFiles()
int getSortRound()
int getNumberOfSortRounds()
void cancel()
void cancel(RuntimeException e)
void cancel(IOException e)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||