All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

## com.sas.iquery.dataretrieval
Class OfflineResultSetConfiguration

    com.sas.iquery.dataretrieval.OfflineResultSetConfiguration

    @SASScope(value="ALL")
    @SubjectToChange
    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:
  - Offline result sets disabled
  - A file block size of 1000 rows
  - A memory block size of 100 rows

### 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. ***

All Libraries | This Library | Package | Class | Use | Tree | Deprecated | Index | Grand Index | Help
|  | Query |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 SAS Institute Inc. All Rights Reserved.