public class PartiallyFetchedInMemoryResultSet extends InMemoryResultSet
getPreFetchedRows()
can be used for streaming
while the persistence logic can iterate over complete result set using hasNext()
and next()
.
Note
Streaming and persistence can occur concurrently irrespective of the underlying InMemoryResultSet
implementation.
Streaming of partial results is not supported at server level as of now.Constructor and Description |
---|
PartiallyFetchedInMemoryResultSet(InMemoryResultSet inMemoryRS,
int reqPreFetchSize)
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBePurged() |
LensResultSetMetadata |
getMetadata()
Get the result set metadata
|
List<ResultRow> |
getPreFetchedRows() |
boolean |
hasNext()
Whether there is another result row available.
|
boolean |
isComplteleyFetched()
Indicates whether the underlying in-memory result has been completely pre-fetched and kept in memory.
|
ResultRow |
next()
Read the next result row.
|
void |
setFetchSize(int size)
Set number of rows to be fetched at time
|
void |
setFullyAccessed(boolean fullyAccessed) |
Integer |
size()
Get the size of the result set.
|
getCreationTime, getOutputPath, isHttpResultAvailable, toQueryResult
public PartiallyFetchedInMemoryResultSet(InMemoryResultSet inMemoryRS, int reqPreFetchSize) throws LensException
inMemoryRS
- : Underlying in-memory result setreqPreFetchSize
- : requested number of rows to be pre-fetched and cached.LensException
public boolean hasNext() throws LensException
InMemoryResultSet
hasNext
in class InMemoryResultSet
LensException
- the lens exceptionpublic ResultRow next() throws LensException
InMemoryResultSet
next
in class InMemoryResultSet
LensException
- the lens exceptionpublic void setFetchSize(int size) throws LensException
InMemoryResultSet
setFetchSize
in class InMemoryResultSet
LensException
public Integer size() throws LensException
LensResultSet
size
in class LensResultSet
LensException
- the lens exceptionpublic LensResultSetMetadata getMetadata() throws LensException
LensResultSet
getMetadata
in class LensResultSet
LensResultSetMetadata
LensException
public boolean canBePurged()
canBePurged
in class InMemoryResultSet
public void setFullyAccessed(boolean fullyAccessed)
setFullyAccessed
in class InMemoryResultSet
@Generated(value="lombok") public boolean isComplteleyFetched()
Copyright © 2014–2016 Apache Software Foundation. All rights reserved.