DexConfig Class Reference
[GDB]

Dex configuration class. More...

List of all members.

Public Member Functions

 DexConfig ()
 Creates a new instance.
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

Dex 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 DexProperties 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 ('dex.storage.extentsize' at DexProperties).

Pages per extent: 1 page ('dex.storage.extentpages' at DexProperties).

Pool frame size: 1 extent ('dex.io.pool.frame.size' at DexProperties).

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

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

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

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

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

License code: "" ('dex.license' at DexProperties). No license code means evaluation license.

Log level: LogLevel::Info ('dex.log.level' at DexProperties).

Log file: "dex.log" ('dex.log.file' at DexProperties).

Cache statistics: false (disabled) ('dex.cache.statistics' at DexProperties).

Cache statistics log file: "statistics.log" ('dex.cache.statisticsFile' at DexProperties).

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

Recovery enabled: false ('dex.io.recovery' at DexProperties).

Recovery log file: "" ('dex.io.recovery.logfile' at DexProperties).

Recovery cache max size: 1MB ('dex.io.recovery.cachesize' at DexProperties).

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

High-availability: false (disabled) ('dex.ha' at DexProperties).

High-availability coordinators: "" ('dex.ha.coordinators' at DexProperties).

High-availability IP: "" ('dex.ha.ip' at DexProperties).

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

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

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

DexConfig::DexConfig (  ) 

Creates a new instance.

Values are set with default values.


Member Function Documentation

int32_t DexConfig::GetExtentSize (  )  const [inline]

Gets the size of a extent.

Returns:
The size of a extent in KB.

void DexConfig::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 DexConfig::GetExtentPages (  )  const [inline]

Gets the number of pages per extent.

Returns:
The number of pages per extent.

void DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::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& DexConfig::GetLicense (  )  const [inline]

Gets the license code.

Returns:
The license code.

void DexConfig::SetLicense ( const std::wstring &  v  )  [inline]

Sets the license code.

Parameters:
v [in] The license code.

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

Gets the log file.

Returns:
The log file.

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

Sets the log file.

Parameters:
v [in] The log file.

LogLevel DexConfig::GetLogLevel (  )  const [inline]

Gets the log level.

Returns:
The LogLevel.

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

Sets the log level.

Parameters:
v [in] The LogLevel.

bool_t DexConfig::GetCacheStatisticsEnabled (  )  const [inline]

Gets whether cache statistics are enabled or disabled.

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

void DexConfig::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& DexConfig::GetCacheStatisticsFile (  )  const [inline]

Gets the cache statistics log file.

Useless if cache statistics are disabled.

Returns:
The cache statistics log file.

void DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::GetRecoveryEnabled (  )  const [inline]

Gets whether the recovery is enabled or disabled.

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

void DexConfig::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& DexConfig::GetRecoveryLogFile (  )  const [inline]

Gets the recovery log file.

Returns:
The recovery log file.

void DexConfig::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 DexConfig::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 DexConfig::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 DexConfig::GetRecoveryCheckpointTime (  )  const [inline]

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

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

void DexConfig::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 DexConfig::GetHighAvailabilityEnabled (  )  const [inline]

Gets whether high availability mode is enabled or disabled.

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

void DexConfig::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& DexConfig::GetHighAvailabilityIP (  )  const [inline]

Gets the IP address and port of the instance.

Returns:
The IP address and port of the instance.

void DexConfig::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& DexConfig::GetHighAvailabilityCoordinators (  )  const [inline]

Gets the coordinators address and port list.

Returns:
The coordinators address and port list.

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

Sets the coordinators address and port list.

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

int64_t DexConfig::GetHighAvailabilitySynchronization (  )  const [inline]

Gets the synchronization polling time.

Returns:
The Synchronization polling time.

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

Sets the synchronization polling time.

Parameters:
v [in] The synchronization polling time.

int64_t DexConfig::GetHighAvailabilityMasterHistory (  )  const [inline]

Gets the master's history log.

Returns:
The master's history log.

void DexConfig::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 Tue Jul 16 12:10:15 2013 for Dex by  doxygen 1.5.6