public class AdaptiveFetchCache extends Object
Constructor and Description |
---|
AdaptiveFetchCache(long maximumResultBufferSize,
Properties info) |
Modifier and Type | Method and Description |
---|---|
void |
addNewQuery(boolean adaptiveFetch,
@NonNull Query query)
Add query to being cached and computing adaptive fetch size.
|
boolean |
getAdaptiveFetch()
Get state of adaptive fetch.
|
int |
getFetchSizeForQuery(boolean adaptiveFetch,
@NonNull Query query)
Get adaptive fetch size for given query.
|
void |
removeQuery(boolean adaptiveFetch,
@NonNull Query query)
Remove query information from caching.
|
void |
setAdaptiveFetch(boolean adaptiveFetch)
Set state of adaptive fetch.
|
void |
updateQueryFetchSize(boolean adaptiveFetch,
@NonNull Query query,
int maximumRowSizeBytes)
Update adaptive fetch size for given query.
|
public AdaptiveFetchCache(long maximumResultBufferSize, Properties info) throws SQLException
SQLException
public void addNewQuery(boolean adaptiveFetch, @NonNull Query query)
adaptiveFetch
- state of adaptive fetch, which should be used during adding queryquery
- query to be cachedpublic void updateQueryFetchSize(boolean adaptiveFetch, @NonNull Query query, int maximumRowSizeBytes)
adaptiveFetch
- state of adaptive fetch, which should be used during updating fetch
size for queryquery
- query to be updatedmaximumRowSizeBytes
- max row size used during updating information about adaptive fetch
size for given querypublic int getFetchSizeForQuery(boolean adaptiveFetch, @NonNull Query query)
adaptiveFetch
- state of adaptive fetch, which should be used during getting fetch size
for queryquery
- query to which we want get adaptive fetch sizepublic void removeQuery(boolean adaptiveFetch, @NonNull Query query)
adaptiveFetch
- state of adaptive fetch, which should be used during removing fetch size
for queryquery
- query to be removed from cachingpublic boolean getAdaptiveFetch()
public void setAdaptiveFetch(boolean adaptiveFetch)
adaptiveFetch
- desired state of adaptive fetchCopyright © 1997-2020 PostgreSQL Global Development Group. All Rights Reserved.