|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
TValue - The expected result type for ending graph vertices who have no out neighbors.public interface ITopologicalSortAsyncResult<TValue,TProcessedValue>
Returned by an asynchronous sort call. Used to know or await for notification of asynchronous processing completion.
| Method Summary | |
|---|---|
boolean |
await()
Provided for conveniency. |
boolean |
await(long timeout,
TimeUnit unit)
Provided for conveniency. |
boolean |
awaitUninterruptibly()
Provided for conveniency. |
boolean |
awaitUninterruptibly(long timeout,
TimeUnit unit)
Provided for conveniency. |
boolean |
contains(TValue value)
Returns a boolean indicating if the results contain a key for the provided value. |
boolean |
discontinueScheduling()
Discontinues further scheduling of additional vertices for processing. |
Iterable<TValue> |
endingValues()
Returns the list of ending values (values for vertices that have no out neighbors) that generated the result. |
TProcessedValue |
first()
Retrieves the result for the first ending value. |
TProcessedValue |
get(TValue value)
Gets the result for an ending value. |
ExecutorService |
getExecutorService()
Provides a reference to the ExecutorService that asynchronous processing was called with. |
boolean |
isDone()
Determines if all processing of vertices has completed. |
boolean |
isEmpty()
Determines if the results are empty. |
boolean |
isProcessingDiscontinued()
Determines if discontinueScheduling() has been called previously. |
boolean |
isSuccessful()
Determines if all vertices have been processed without incident. |
TProcessedValue |
resultFor(TValue value)
Retrieves the result for an ending value. |
Iterable<TProcessedValue> |
results()
Generates an instance of Iterable that allows traversing the contents of the results. |
int |
size()
The number of returned results. |
boolean |
waitForCompletion()
Waits indefinitely and uninterruptibly for the asynchronous sort to signal that it's done processing. |
boolean |
waitForCompletion(long timeout,
TimeUnit unit)
Waits indefinitely and uninterruptibly for the asynchronous sort to signal that it's done processing. |
| Method Detail |
|---|
boolean isDone()
boolean isSuccessful()
waitForCompletion(), await(), or awaitUninterruptibly()
have returned. Calling waitForCompletion() will return this same value after all vertices have been
processed. It's suggested you use waitForCompletion().
boolean isProcessingDiscontinued()
discontinueScheduling() has been called previously.
discontinueScheduling() has been called previously, otherwise false.ExecutorService getExecutorService()
ExecutorService that asynchronous processing was called with.
ExecutorService instance.boolean discontinueScheduling()
getExecutorService()
instance. Instead, call this method and then waitForCompletion() which will
allow all previously submitted vertices to drain.
boolean waitForCompletion()
boolean waitForCompletion(long timeout,
TimeUnit unit)
timeout - Length of time in TimeUnit units to wait for completion.unit - TimeUnit unit of time represented by the timeout.
boolean awaitUninterruptibly()
waitForCompletion().
isSuccessful() or simply call waitForCompletion() instead.
boolean awaitUninterruptibly(long timeout,
TimeUnit unit)
waitForCompletion().
timeout - Length of time in TimeUnit units to wait for completion.unit - TimeUnit unit of time represented by the timeout.
isSuccessful() or simply call waitForCompletion() instead.
boolean await()
throws InterruptedException
waitForCompletion().
isSuccessful() or simply call waitForCompletion() instead.
InterruptedException
boolean await(long timeout,
TimeUnit unit)
throws InterruptedException
waitForCompletion().
timeout - Length of time in TimeUnit units to wait for completion.unit - TimeUnit unit of time represented by the timeout.
isSuccessful() or simply call waitForCompletion() instead.
InterruptedExceptionboolean isEmpty()
isSuccessful() or
waitForCompletion() returns true.
true if the results are empty or processing has not completed; false otherwise.TProcessedValue get(TValue value)
resultFor(Object).
The results should be considered unreliable until after isDone() or
waitForCompletion() returns.
value - The value whose result you want.resultFor(Object)TProcessedValue resultFor(TValue value)
isDone() or
waitForCompletion() returns.
value - The value whose result you want.
null if the value is not in the result list.TProcessedValue first()
get(Object) or resultFor(Object) methods.
The results should be considered unreliable until after isDone() or
waitForCompletion() returns.
null if there are no values in the result list.int size()
isDone() or
waitForCompletion() returns.
results()boolean contains(TValue value)
isDone() or
waitForCompletion() returns.
value - The value for whom membership in the results will be tested.
true if the provided value is a member of the results; false otherwise.Iterable<TProcessedValue> results()
Iterable that allows traversing the contents of the results.
The results should be considered unreliable until after isDone() or
waitForCompletion() returns.
Iterable for traversing the contents of the results.Iterable<TValue> endingValues()
isDone() or
waitForCompletion() returns.
Iterable representing the ending values (values for vertices that have no out neighbors) that generated the result.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||