***  This class is subject to change.  ***

com.sas.iquery.dataretrieval
Class OfflineResultSetConfiguration

com.sas.iquery.dataretrieval.OfflineResultSetConfiguration

public class OfflineResultSetConfiguration

Contains settings that are used to configure offline result sets.

Offline result sets are inclusive two-level caches which pre-fetch a number of rows to a temporary file on disk and keep some of these in memory for immediate access. This allows the connection to the server to be released immediately after pre-fetching. Queries are re-executed when rows not in the cache are accessed.

Since this is slower than a "live" result set, offline result sets should only be used if releasing the server connection is really needed, for example for systems supporting many concurrent users.

See Also:
ConnectionConfiguration, RetrievalPolicy

Constructor Summary
OfflineResultSetConfiguration()
          Creates a new OfflineResultSetConfiguration with default settings.
OfflineResultSetConfiguration(OfflineResultSetConfiguration offlineResultSetConfiguration)
          Copy constructor.
 
Method Summary
 int getFileBlockSize()
          Returns the number of rows which will be saved on disk in the page file.
 int getMemoryBlockSize()
          Returns the number of rows which will be cached in memory.
 boolean isOfflineResultSetsEnabled()
          Return the configured status of offline result sets.
 void setBlockSizes(int memoryBlockSize, int fileBlockSizeFactor)
          Sets the number of rows to cache in memory and on disk.
 void setOfflineResultSetsEnabled(boolean offlineResultSetsEnabled)
          Enables or disables offline result sets.
 

Constructor Detail

OfflineResultSetConfiguration

public OfflineResultSetConfiguration()
Creates a new OfflineResultSetConfiguration with default settings. The default settings are:


OfflineResultSetConfiguration

public OfflineResultSetConfiguration(OfflineResultSetConfiguration offlineResultSetConfiguration)
Copy constructor. Creates a new OfflineResultSetConfiguration which has the same settings as the one given.

Method Detail

getFileBlockSize

public int getFileBlockSize()
Returns the number of rows which will be saved on disk in the page file.

Returns:
The number of rows which will be saved in the page file

getMemoryBlockSize

public int getMemoryBlockSize()
Returns the number of rows which will be cached in memory.

Returns:
The number of rows which will be cached in memory

setBlockSizes

public void setBlockSizes(int memoryBlockSize,
                          int fileBlockSizeFactor)
Sets the number of rows to cache in memory and on disk. Example:
setBlockSizes(200, 10);

will store 2000 rows on disk and cache 200 of these in memory.

Parameters:
memoryBlockSize - The number of rows which will be saved in memory
fileBlockSizeFactor - The factor of file rows to memory rows

isOfflineResultSetsEnabled

public boolean isOfflineResultSetsEnabled()
Return the configured status of offline result sets.

Returns:
true If offline result sets are enabled

setOfflineResultSetsEnabled

public void setOfflineResultSetsEnabled(boolean offlineResultSetsEnabled)
Enables or disables offline result sets.

Parameters:
offlineResultSetsEnabled - Set true to enable offline result sets.

***  This class is subject to change.  ***




Copyright © 2009 SAS Institute Inc. All Rights Reserved.