private class AsynchronousSectionedRenderer.DataListListener extends AsynchronousSectionedRenderer.RendererListener
A stack of registered renderers is maintained to maintain this constraint.
A renderer maintains state sufficient to allow it to resume rendering at a later stage. This is to be able to render child lists to completion before completing rendering of the parent list. In addition, this feature is used by DataListeners (see below).
Modifier and Type | Field and Description |
---|---|
private int |
currentIndex
The index of the next data item where rendering should be initiated in this list
|
private com.yahoo.processing.response.DataList |
list
The list which this is listening to
|
private boolean |
listStartIsRendered |
private AsynchronousSectionedRenderer.DataListListener |
parent
The listener to the parent of this list, or null if this is the root
|
private int |
uncompletedChildren
Children of this which has started rendering but not yet completed
|
Constructor and Description |
---|
DataListListener(com.yahoo.processing.response.DataList list,
AsynchronousSectionedRenderer.DataListListener parent) |
Modifier and Type | Method and Description |
---|---|
private void |
childCompleted()
Called each time a direct child of this completed.
|
private void |
closeIO(Exception failed) |
private void |
endListLevel() |
private void |
endRenderLevel(com.yahoo.processing.response.DataList<?> current) |
private boolean |
isOrdered(com.yahoo.processing.response.DataList dataList) |
private boolean |
isStreamed(com.yahoo.processing.response.DataList dataList) |
private void |
listenTo(com.yahoo.processing.response.DataList subList,
boolean listenToNewDataAdded) |
protected void |
render() |
private boolean |
renderData()
Resumes rendering data from the current position.
|
private void |
renderDataList(com.yahoo.processing.response.DataList list)
Renders a list
|
(package private) void |
renderDataListStart() |
String |
toString() |
flushIfLikelyToSuspend, run
private int currentIndex
private int uncompletedChildren
private boolean listStartIsRendered
private final com.yahoo.processing.response.DataList list
private final AsynchronousSectionedRenderer.DataListListener parent
public DataListListener(com.yahoo.processing.response.DataList list, AsynchronousSectionedRenderer.DataListListener parent)
protected void render() throws IOException, InterruptedException, ExecutionException
render
in class AsynchronousSectionedRenderer.RendererListener
IOException
InterruptedException
ExecutionException
private void endListLevel() throws IOException
IOException
private void childCompleted()
private boolean renderData() throws IOException
IOException
void renderDataListStart() throws IOException
IOException
private void renderDataList(com.yahoo.processing.response.DataList list) throws IOException
IOException
private void listenTo(com.yahoo.processing.response.DataList subList, boolean listenToNewDataAdded) throws IOException
IOException
private boolean isOrdered(com.yahoo.processing.response.DataList dataList)
private boolean isStreamed(com.yahoo.processing.response.DataList dataList)
private void endRenderLevel(com.yahoo.processing.response.DataList<?> current) throws IOException
IOException
private void closeIO(Exception failed)
Copyright © 2017. All rights reserved.