Sparksee  5.2.0
STSSparkseeConfig Class Reference

Sparksee configuration class. More...

Inheritance diagram for STSSparkseeConfig:
Inheritance graph
Collaboration diagram for STSSparkseeConfig:
Collaboration graph

Instance Methods

(id) - init
 Creates a new instance.
 
(int) - getExtentSize
 Gets the size of a extent.
 
(void) - setExtentSize:
 Sets the size of the extents in KB.
 
(int) - getExtentPages
 Gets the number of pages per extent.
 
(void) - setExtentPages:
 Sets the number of pages per extent.
 
(int) - getPoolFrameSize
 Gets the size of a pool frame in number of extents.
 
(void) - setPoolFrameSize:
 Sets the size of a pool frame in number of extents.
 
(int) - getPoolPersistentMinSize
 Gets the minimum size for the persistent pool in number of frames.
 
(void) - setPoolPersistentMinSize:
 Sets the minimum size for the persistent pool in number of frames.
 
(int) - getPoolPersistentMaxSize
 Gets the maximum size for the persistent pool in number of frames.
 
(void) - setPoolPersistentMaxSize:
 Sets the maximum size for the persistent pool in number of frames.
 
(int) - getPoolTemporaryMinSize
 Gets the minimum size for the temporary pool in number of frames.
 
(void) - setPoolTemporaryMinSize:
 Sets the minimum size for the temporary pool in number of frames.
 
(int) - getPoolTemporaryMaxSize
 Gets the maximum size for the temporary pool in number of frames.
 
(void) - setPoolTemporaryMaxSize:
 Sets the maximum size for the temporary pool in number of frames.
 
(int) - getPoolClusterSize
 Gets the number of pools in each PoolCluster.
 
(void) - setPoolClusterSize:
 Sets the number of pools in each PoolCluster.
 
(int) - getCacheMaxSize
 Gets the maximum size for the cache (all pools) in MB.
 
(void) - setCacheMaxSize:
 Sets the maximum size for the cache (all pools) in MB.
 
(NSString *) - getLicense
 Gets the license code.
 
(void) - setLicense:
 Sets the license code.
 
(NSString *) - getLogFile
 Gets the log file.
 
(void) - setLogFile:
 Sets the log file.
 
(enum STSLogLevel) - getLogLevel
 Gets the log level.
 
(void) - setLogLevel:
 Sets the log level.
 
(BOOL) - getCacheStatisticsEnabled
 Gets whether cache statistics are enabled or disabled.
 
(void) - setCacheStatisticsEnabled:
 Enables or disables cache statistics.
 
(NSString *) - getCacheStatisticsFile
 Gets the cache statistics log file.
 
(void) - setCacheStatisticsFile:
 Sets the cache statistics log file.
 
(long long) - getCacheStatisticsSnapshotTime
 Gets the cache statistics snapshot time in microseconds.
 
(void) - setCacheStatisticsSnapshotTime:
 Sets the cache statistics snapshot time.
 
(BOOL) - getRollbackEnabled
 Gets whether the rollback is enabled or disabled.
 
(void) - setRollbackEnabled:
 Enables or disables the rollback.
 
(BOOL) - getRecoveryEnabled
 Gets whether the recovery is enabled or disabled.
 
(void) - setRecoveryEnabled:
 Enables or disables the recovery.
 
(NSString *) - getRecoveryLogFile
 Gets the recovery log file.
 
(void) - setRecoveryLogFile:
 Sets the recovery log file.
 
(int) - getRecoveryCacheMaxSize
 Gets the maximum size for the recovery log cache in extents.
 
(void) - setRecoveryCacheMaxSize:
 Sets the maximum size for the recovery log cache in extents.
 
(long long) - getRecoveryCheckpointTime
 Gets the delay time (in microseconds) between automatic checkpoints.
 
(void) - setRecoveryCheckpointTime:
 Sets the delay time (in microseconds) between automatic checkpoints.
 
(BOOL) - getHighAvailabilityEnabled
 Gets whether high availability mode is enabled or disabled.
 
(void) - setHighAvailabilityEnabled:
 Enables or disables high availability mode.
 
(NSString *) - getHighAvailabilityIP
 Gets the IP address and port of the instance.
 
(void) - setHighAvailabilityIP:
 Sets the IP address and port of the instance.
 
(NSString *) - getHighAvailabilityCoordinators
 Gets the coordinators address and port list.
 
(void) - setHighAvailabilityCoordinators:
 Sets the coordinators address and port list.
 
(long long) - getHighAvailabilitySynchronization
 Gets the synchronization polling time.
 
(void) - setHighAvailabilitySynchronization:
 Sets the synchronization polling time.
 
(long long) - getHighAvailabilityMasterHistory
 Gets the master's history log.
 
(void) - setHighAvailabilityMasterHistory:
 Sets the master's history log.
 

Detailed Description

Sparksee configuration class.

If not specified, 0 means unlimited which is the maximum available. For the pools that's the total cache size. For the cache unlimited means nearly all the physical memory of the computer.

For each field, there is a default value. This value can be overrided with values from a properties file (see SparkseeProperties class). Also, this settings can be overrided calling a specific setter.

For each field, it is shown its default value and the property to override this value:

Extent size: 4KB ('sparksee.storage.extentsize' at SparkseeProperties).

Pages per extent: 1 page ('sparksee.storage.extentpages' at SparkseeProperties).

Pool frame size: 1 extent ('sparksee.io.pool.frame.size' at SparkseeProperties).

Minimum size for the persistent pool: 64 frames ('sparksee.io.pool.persistent.minsize' at SparkseeProperties).

Maximum size for the persistent pool: 0 frames ('sparksee.io.pool.persistent.maxsize' at SparkseeProperties).

Minimum size for the temporary pool: 16 frames ('sparksee.io.pool.temporal.minsize' at SparkseeProperties).

Maximum size for the temporary pool: 0 frames ('sparksee.io.pool.temporal.maxsize' at SparkseeProperties).

Number of pools in the pool cluster: 0 pools ('sparksee.io.pool.clustersize' at SparkseeProperties). 0 or 1 means the clustering is disabled.

Maximum size for the cache (all pools): 0 MB ('sparksee.io.cache.maxsize' at SparkseeProperties).

License code: "" ('sparksee.license' at SparkseeProperties). No license code means evaluation license.

Log level: Info ('sparksee.log.level' at SparkseeProperties).

Log file: "sparksee.log" ('sparksee.log.file' at SparkseeProperties).

Cache statistics: false (disabled) ('sparksee.cache.statistics' at SparkseeProperties).

Cache statistics log file: "statistics.log" ('sparksee.cache.statisticsFile' at SparkseeProperties).

Cache statistics snapshot time: 1000 msecs [TimeUnit] ('sparksee.cache.statisticsSnapshotTime' at SparkseeProperties).

Recovery enabled: false ('sparksee.io.recovery' at SparkseeProperties).

Recovery log file: "" ('sparksee.io.recovery.logfile' at SparkseeProperties).

Recovery cache max size: 1MB ('sparksee.io.recovery.cachesize' at SparkseeProperties).

Recovery checkpoint time: 60 seconds [TimeUnit] ('sparksee.io.recovery.checkpointTime' at SparkseeProperties).

High-availability: false (disabled) ('sparksee.ha' at SparkseeProperties).

High-availability coordinators: "" ('sparksee.ha.coordinators' at SparkseeProperties).

High-availability IP: "" ('sparksee.ha.ip' at SparkseeProperties).

High-availability sync polling: 0 (disabled) [TimeUnit] ('sparksee.ha.sync' at SparkseeProperties).

High-availability master history: 1D (1 day) [TimeUnit] ('sparksee.ha.master.history' at SparkseeProperties).

Use of TimeUnit:

Those variables using TimeUnit allow for:

<X>[D|H|M|S|s|m|u]

where <X> is a number followed by an optional character which represents the unit: D for days, H for hours, M for minutes, S or s for seconds, m for milliseconds and u for microseconds. If no unit character is given, seconds are assumed.

Author
Sparsity Technologies http://www.sparsity-technologies.com

Method Documentation

- (int) getCacheMaxSize

Gets the maximum size for the cache (all pools) in MB.

Returns
The maximum size for the cache (all pools) in MB.
- (BOOL) getCacheStatisticsEnabled

Gets whether cache statistics are enabled or disabled.

Returns
TRUE if cache statistics are enabled, FALSE otherwise.
- (NSString*) getCacheStatisticsFile

Gets the cache statistics log file.

Useless if cache statistics are disabled.

Returns
The cache statistics log file.
- (long long) getCacheStatisticsSnapshotTime

Gets the cache statistics snapshot time in microseconds.

Useless if cache statistics are disabled.

Returns
The cache statistics snapshot time in microseconds.
- (int) getExtentPages

Gets the number of pages per extent.

Returns
The number of pages per extent.
- (int) getExtentSize

Gets the size of a extent.

Returns
The size of a extent in KB.
- (NSString*) getHighAvailabilityCoordinators

Gets the coordinators address and port list.

Returns
The coordinators address and port list.
- (BOOL) getHighAvailabilityEnabled

Gets whether high availability mode is enabled or disabled.

Returns
TRUE if high availability mode is enabled, FALSE otherwise.
- (NSString*) getHighAvailabilityIP

Gets the IP address and port of the instance.

Returns
The IP address and port of the instance.
- (long long) getHighAvailabilityMasterHistory

Gets the master's history log.

Returns
The master's history log.
- (long long) getHighAvailabilitySynchronization

Gets the synchronization polling time.

Returns
The Synchronization polling time.
- (NSString*) getLicense

Gets the license code.

Returns
The license code.
- (NSString*) getLogFile

Gets the log file.

Returns
The log file.
- (enum STSLogLevel) getLogLevel

Gets the log level.

Returns
The LogLevel.
- (int) getPoolClusterSize

Gets the number of pools in each PoolCluster.

Returns
The number of pools in each PoolCluster.
- (int) getPoolFrameSize

Gets the size of a pool frame in number of extents.

Returns
The size of a pool frame in number of extents.
- (int) getPoolPersistentMaxSize

Gets the maximum size for the persistent pool in number of frames.

Returns
The maximum size for the persistent pool in number of frames.
- (int) getPoolPersistentMinSize

Gets the minimum size for the persistent pool in number of frames.

Returns
The minimum size for the persistent pool in number of frames.
- (int) getPoolTemporaryMaxSize

Gets the maximum size for the temporary pool in number of frames.

Returns
The maximum size for the temporary pool in number of frames.
- (int) getPoolTemporaryMinSize

Gets the minimum size for the temporary pool in number of frames.

Returns
The minimum size for the temporary pool in number of frames.
- (int) getRecoveryCacheMaxSize

Gets the maximum size for the recovery log cache in extents.

Returns
The maximum size for the recovery log cache in extents.
- (long long) getRecoveryCheckpointTime

Gets the delay time (in microseconds) between automatic checkpoints.

Returns
The delay time (in microseconds) between automatic checkpoints.
- (BOOL) getRecoveryEnabled

Gets whether the recovery is enabled or disabled.

Returns
TRUE if the recovery is enabled, FALSE otherwise.
- (NSString*) getRecoveryLogFile

Gets the recovery log file.

Returns
The recovery log file.
- (BOOL) getRollbackEnabled

Gets whether the rollback is enabled or disabled.

Returns
TRUE if the rollback is enabled, FALSE otherwise.
- (id) init

Creates a new instance.

Values are set with default values.

- (void) setCacheMaxSize: (int)  megaBytes

Sets the maximum size for the cache (all pools) in MB.

Parameters
megaBytes[in] The maximum size for the cache (all pools) in MB. It must be non-negative.
- (void) setCacheStatisticsEnabled: (BOOL)  status

Enables or disables cache statistics.

Parameters
status[in] If TRUE this enables cache statistics, if FALSE this disables cache statistics.
- (void) setCacheStatisticsFile: (NSString *)  filePath

Sets the cache statistics log file.

Useless if cache statistics are disabled.

Parameters
filePath[in] The cache statistics log file.
- (void) setCacheStatisticsSnapshotTime: (long long)  microSeconds

Sets the cache statistics snapshot time.

Useless if cache statistics are disabled.

Parameters
microSeconds[in] The cache statistics snapshot time in microseconds.
- (void) setExtentPages: (int)  pages

Sets the number of pages per extent.

Parameters
pages[in] The number of pages. It must be at least 1 page and the page size must be greater than or equal to 4KB.
- (void) setExtentSize: (int)  kBytes

Sets the size of the extents in KB.

Parameters
kBytes[in] The size of an extent in KB. An extent can have a size between 4KB and 64KB, and it must be a power of 2.
- (void) setHighAvailabilityCoordinators: (NSString *)  ip

Sets the coordinators address and port list.

Parameters
ip[in] The coordinators address and port list.
- (void) setHighAvailabilityEnabled: (BOOL)  status

Enables or disables high availability mode.

Parameters
status[in] If TRUE this enables high availability mode, if FALSE this disables high availability mode.
- (void) setHighAvailabilityIP: (NSString *)  ip

Sets the IP address and port of the instance.

Parameters
ip[in] The IP address and port of the instance.
- (void) setHighAvailabilityMasterHistory: (long long)  filePath

Sets the master's history log.

Parameters
filePath[in] The master's history log.
- (void) setHighAvailabilitySynchronization: (long long)  microSeconds

Sets the synchronization polling time.

Parameters
microSeconds[in] The synchronization polling time.
- (void) setLicense: (NSString *)  key

Sets the license code.

Parameters
key[in] The license code.
- (void) setLogFile: (NSString *)  filePath

Sets the log file.

Parameters
filePath[in] The log file.
- (void) setLogLevel: (enum STSLogLevel)  level

Sets the log level.

Parameters
level[in] The LogLevel.
- (void) setPoolClusterSize: (int)  pools

Sets the number of pools in each PoolCluster.

Parameters
pools[in] The number of pools in each PoolCluster. It must be non-negative.
- (void) setPoolFrameSize: (int)  extents

Sets the size of a pool frame in number of extents.

Parameters
extents[in] The size of a pool frame in number of extents. It must be non-negative.
- (void) setPoolPersistentMaxSize: (int)  frames

Sets the maximum size for the persistent pool in number of frames.

Parameters
frames[in] The maximum size for the persistent pool in number of frames. It must be non-negative.
- (void) setPoolPersistentMinSize: (int)  frames

Sets the minimum size for the persistent pool in number of frames.

Parameters
frames[in] The minimum size for the persistent pool in number of frames. It must be non-negative.
- (void) setPoolTemporaryMaxSize: (int)  frames

Sets the maximum size for the temporary pool in number of frames.

Parameters
frames[in] The maximum size for the temporary pool in number of frames. It must be non-negative.
- (void) setPoolTemporaryMinSize: (int)  frames

Sets the minimum size for the temporary pool in number of frames.

Parameters
frames[in] The minimum size for the temporary pool in number of frames. It must be non-negative.
- (void) setRecoveryCacheMaxSize: (int)  extents

Sets the maximum size for the recovery log cache in extents.

Parameters
extents[in] The maximum size for the recovery log cache in extents. A 0 sets the default value (extents up to 1MB).
- (void) setRecoveryCheckpointTime: (long long)  microSeconds

Sets the delay time (in microseconds) between automatic checkpoints.

Parameters
microSeconds[in] The delay time (in microseconds) between automatic checkpoints. A 0 forces a checkpoint after each commited transaction.
- (void) setRecoveryEnabled: (BOOL)  status

Enables or disables the recovery.

Parameters
status[in] If TRUE this enables the recovery, if FALSE then disables it.
- (void) setRecoveryLogFile: (NSString *)  filePath

Sets the recovery log file.

Parameters
filePath[in] The recovery log file. Left it empty for the default log file (same as <database_file_name>.log)
- (void) setRollbackEnabled: (BOOL)  status

Enables or disables the rollback.

Parameters
status[in] If TRUE this enables the rollback, if FALSE then disables it.

The documentation for this class was generated from the following file: