SparkseeConfig Class Reference
[Gdb]

Sparksee configuration class. More...

List of all members.

Public Member Functions

 SparkseeConfig ()
 Creates a new instance.
virtual ~SparkseeConfig ()
 Destructor.
int32_t GetExtentSize () const
 Gets the size of a extent.
void SetExtentSize (int32_t v)
 Sets the size of a pool frame in number of extents.
int32_t GetExtentPages () const
 Gets the number of pages per extent.
void SetExtentPages (int32_t v)
 Sets the number of pages per extent.
int32_t GetPoolFrameSize () const
 Gets the size of a pool frame in number of extents.
void SetPoolFrameSize (int32_t v)
 Sets the size of a pool frame in number of extents.
int32_t GetPoolPersistentMinSize () const
 Gets the minimum size for the persistent pool in number of frames.
void SetPoolPersistentMinSize (int32_t v)
 Sets the minimum size for the persistent pool in number of frames.
int32_t GetPoolPersistentMaxSize () const
 Gets the maximum size for the persistent pool in number of frames.
void SetPoolPersistentMaxSize (int32_t v)
 Sets the maximum size for the persistent pool in number of frames.
int32_t GetPoolTemporaryMinSize () const
 Gets the minimum size for the temporary pool in number of frames.
void SetPoolTemporaryMinSize (int32_t v)
 Sets the minimum size for the temporary pool in number of frames.
int32_t GetPoolTemporaryMaxSize () const
 Gets the maximum size for the temporary pool in number of frames.
void SetPoolTemporaryMaxSize (int32_t v)
 Sets the maximum size for the temporary pool in number of frames.
int32_t GetCacheMaxSize () const
 Gets the maximum size for the cache (all pools) in MB.
void SetCacheMaxSize (int32_t v)
 Sets the maximum size for the cache (all pools) in MB.
const std::wstring & GetLicense () const
 Gets the license code.
void SetLicense (const std::wstring &v)
 Sets the license code.
const std::wstring & GetLogFile () const
 Gets the log file.
void SetLogFile (const std::wstring &v)
 Sets the log file.
LogLevel GetLogLevel () const
 Gets the log level.
void SetLogLevel (LogLevel v)
 Sets the log level.
bool_t GetCacheStatisticsEnabled () const
 Gets whether cache statistics are enabled or disabled.
void SetCacheStatisticsEnabled (bool_t v)
 Enables or disables cache statistics.
const std::wstring & GetCacheStatisticsFile () const
 Gets the cache statistics log file.
void SetCacheStatisticsFile (const std::wstring &v)
 Sets the cache statistics log file.
int64_t GetCacheStatisticsSnapshotTime () const
 Gets the cache statistics snapshot time in microseconds.
void SetCacheStatisticsSnapshotTime (int64_t v)
 Sets the cache statistics snapshot time.
bool_t GetRecoveryEnabled () const
 Gets whether the recovery is enabled or disabled.
void SetRecoveryEnabled (bool_t v)
 Enables or disables the recovery.
const std::wstring & GetRecoveryLogFile () const
 Gets the recovery log file.
void SetRecoveryLogFile (const std::wstring &v)
 Sets the recovery log file.
int32_t GetRecoveryCacheMaxSize () const
 Gets the maximum size for the recovery log cache in extents.
void SetRecoveryCacheMaxSize (int32_t v)
 Sets the maximum size for the recovery log cache in extents.
int64_t GetRecoveryCheckpointTime () const
 Gets the delay time (in microseconds) between automatic checkpoints.
void SetRecoveryCheckpointTime (int64_t v)
 Sets the delay time (in microseconds) between automatic checkpoints.
bool_t GetHighAvailabilityEnabled () const
 Gets whether high availability mode is enabled or disabled.
void SetHighAvailabilityEnabled (bool_t v)
 Enables or disables high availability mode.
const std::wstring & GetHighAvailabilityIP () const
 Gets the IP address and port of the instance.
void SetHighAvailabilityIP (const std::wstring &v)
 Sets the IP address and port of the instance.
const std::wstring & GetHighAvailabilityCoordinators () const
 Gets the coordinators address and port list.
void SetHighAvailabilityCoordinators (const std::wstring &v)
 Sets the coordinators address and port list.
int64_t GetHighAvailabilitySynchronization () const
 Gets the synchronization polling time.
void SetHighAvailabilitySynchronization (int64_t v)
 Sets the synchronization polling time.
int64_t GetHighAvailabilityMasterHistory () const
 Gets the master's history log.
void SetHighAvailabilityMasterHistory (int64_t v)
 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).

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

Constructor & Destructor Documentation

SparkseeConfig::SparkseeConfig (  ) 

Creates a new instance.

Values are set with default values.


Member Function Documentation

int32_t SparkseeConfig::GetExtentSize (  )  const [inline]

Gets the size of a extent.

Returns:
The size of a extent in KB.

void SparkseeConfig::SetExtentSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The size of a extent size in KB. An extent can have a size between 4KB and 64KB, and it must be a power of 2.

int32_t SparkseeConfig::GetExtentPages (  )  const [inline]

Gets the number of pages per extent.

Returns:
The number of pages per extent.

void SparkseeConfig::SetExtentPages ( int32_t  v  )  [inline]

Sets the number of pages per extent.

Parameters:
v [in] The number of pages. It must be at least 1 page and the page size must be greater than or equal to 4KB.

int32_t SparkseeConfig::GetPoolFrameSize (  )  const [inline]

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

Returns:
The size of a pool frame in number of extents.

void SparkseeConfig::SetPoolFrameSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The size of a pool frame in number of extents. It must be non-negative.

int32_t SparkseeConfig::GetPoolPersistentMinSize (  )  const [inline]

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

Returns:
The minimum size for the persistent pool in number of frames.

void SparkseeConfig::SetPoolPersistentMinSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The minimum size for the persistent pool in number of frames. It must be non-negative.

int32_t SparkseeConfig::GetPoolPersistentMaxSize (  )  const [inline]

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

Returns:
The maximum size for the persistent pool in number of frames.

void SparkseeConfig::SetPoolPersistentMaxSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The maximum size for the persistent pool in number of frames. It must be non-negative.

int32_t SparkseeConfig::GetPoolTemporaryMinSize (  )  const [inline]

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

Returns:
The minimum size for the temporary pool in number of frames.

void SparkseeConfig::SetPoolTemporaryMinSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The minimum size for the temporary pool in number of frames. It must be non-negative.

int32_t SparkseeConfig::GetPoolTemporaryMaxSize (  )  const [inline]

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

Returns:
The maximum size for the temporary pool in number of frames.

void SparkseeConfig::SetPoolTemporaryMaxSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The maximum size for the temporary pool in number of frames. It must be non-negative.

int32_t SparkseeConfig::GetCacheMaxSize (  )  const [inline]

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

Returns:
The maximum size for the cache (all pools) in MB.

void SparkseeConfig::SetCacheMaxSize ( int32_t  v  )  [inline]

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

Parameters:
v [in] The maximum size for the cache (all pools) in MB. It must be non-negative.

const std::wstring& SparkseeConfig::GetLicense (  )  const [inline]

Gets the license code.

Returns:
The license code.

void SparkseeConfig::SetLicense ( const std::wstring &  v  ) 

Sets the license code.

Parameters:
v [in] The license code.

const std::wstring& SparkseeConfig::GetLogFile (  )  const [inline]

Gets the log file.

Returns:
The log file.

void SparkseeConfig::SetLogFile ( const std::wstring &  v  )  [inline]

Sets the log file.

Parameters:
v [in] The log file.

LogLevel SparkseeConfig::GetLogLevel (  )  const [inline]

Gets the log level.

Returns:
The LogLevel.

void SparkseeConfig::SetLogLevel ( LogLevel  v  )  [inline]

Sets the log level.

Parameters:
v [in] The LogLevel.

bool_t SparkseeConfig::GetCacheStatisticsEnabled (  )  const [inline]

Gets whether cache statistics are enabled or disabled.

Returns:
TRUE if cache statistics are enabled, FALSE otherwise.

void SparkseeConfig::SetCacheStatisticsEnabled ( bool_t  v  )  [inline]

Enables or disables cache statistics.

Parameters:
v [in] If TRUE this enables cache statistics, if FALSE this disables cache statistics.

const std::wstring& SparkseeConfig::GetCacheStatisticsFile (  )  const [inline]

Gets the cache statistics log file.

Useless if cache statistics are disabled.

Returns:
The cache statistics log file.

void SparkseeConfig::SetCacheStatisticsFile ( const std::wstring &  v  )  [inline]

Sets the cache statistics log file.

Useless if cache statistics are disabled.

Parameters:
v [in] The cache statistics log file.

int64_t SparkseeConfig::GetCacheStatisticsSnapshotTime (  )  const [inline]

Gets the cache statistics snapshot time in microseconds.

Useless if cache statistics are disabled.

Returns:
The cache statistics snapshot time in microseconds.

void SparkseeConfig::SetCacheStatisticsSnapshotTime ( int64_t  v  )  [inline]

Sets the cache statistics snapshot time.

Useless if cache statistics are disabled.

Parameters:
v [in] The cache statistics snapshot time in microseconds.

bool_t SparkseeConfig::GetRecoveryEnabled (  )  const [inline]

Gets whether the recovery is enabled or disabled.

Returns:
TRUE if the recovery is enabled, FALSE otherwise.

void SparkseeConfig::SetRecoveryEnabled ( bool_t  v  )  [inline]

Enables or disables the recovery.

Parameters:
v [in] If TRUE this enables the recovery, if FALSE then disables it.

const std::wstring& SparkseeConfig::GetRecoveryLogFile (  )  const [inline]

Gets the recovery log file.

Returns:
The recovery log file.

void SparkseeConfig::SetRecoveryLogFile ( const std::wstring &  v  )  [inline]

Sets the recovery log file.

Parameters:
v [in] The recovery log file. Left it empty for the default log file (same as <database_file_name>.log)

int32_t SparkseeConfig::GetRecoveryCacheMaxSize (  )  const [inline]

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

Returns:
The maximum size for the recovery log cache in extents.

void SparkseeConfig::SetRecoveryCacheMaxSize ( int32_t  v  )  [inline]

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

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

int64_t SparkseeConfig::GetRecoveryCheckpointTime (  )  const [inline]

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

Returns:
The delay time (in microseconds) between automatic checkpoints.

void SparkseeConfig::SetRecoveryCheckpointTime ( int64_t  v  )  [inline]

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

Parameters:
v [in] The delay time (in microseconds) between automatic checkpoints. A 0 forces a checkpoint after each commited transaction.

bool_t SparkseeConfig::GetHighAvailabilityEnabled (  )  const [inline]

Gets whether high availability mode is enabled or disabled.

Returns:
TRUE if high availability mode is enabled, FALSE otherwise.

void SparkseeConfig::SetHighAvailabilityEnabled ( bool_t  v  )  [inline]

Enables or disables high availability mode.

Parameters:
v [in] If TRUE this enables high availability mode, if FALSE this disables high availability mode.

const std::wstring& SparkseeConfig::GetHighAvailabilityIP (  )  const [inline]

Gets the IP address and port of the instance.

Returns:
The IP address and port of the instance.

void SparkseeConfig::SetHighAvailabilityIP ( const std::wstring &  v  )  [inline]

Sets the IP address and port of the instance.

Parameters:
v [in] The IP address and port of the instance.

const std::wstring& SparkseeConfig::GetHighAvailabilityCoordinators (  )  const [inline]

Gets the coordinators address and port list.

Returns:
The coordinators address and port list.

void SparkseeConfig::SetHighAvailabilityCoordinators ( const std::wstring &  v  )  [inline]

Sets the coordinators address and port list.

Parameters:
v [in] The coordinators address and port list.

int64_t SparkseeConfig::GetHighAvailabilitySynchronization (  )  const [inline]

Gets the synchronization polling time.

Returns:
The Synchronization polling time.

void SparkseeConfig::SetHighAvailabilitySynchronization ( int64_t  v  )  [inline]

Sets the synchronization polling time.

Parameters:
v [in] The synchronization polling time.

int64_t SparkseeConfig::GetHighAvailabilityMasterHistory (  )  const [inline]

Gets the master's history log.

Returns:
The master's history log.

void SparkseeConfig::SetHighAvailabilityMasterHistory ( int64_t  v  )  [inline]

Sets the master's history log.

Parameters:
v [in] The master's history log.


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

Generated on Fri Feb 7 13:10:06 2014 for Sparksee by  doxygen 1.5.6