CSMemoryDatabaseConfiguration
in package
Defines the configuration class for the memory database interface.
The class provides setter & getter method to set & get configuration values for the memory database instance.
Tags
Table of Contents
- __construct() : mixed
- Defines the constructor of the memory database configuration.
- addValue() : void
- Adds a value with key & value.
- getCacheType() : string
- Returns the configured cache type of the memory database configuration.
- getCredentials() : CSMemoryDatabaseCredentials|null
- Returns the configured credentials API object of the memory database configuration.
- getHash() : string
- Returns the unique hash of the memory database configuration to use as cache key.
- getServiceType() : int
- Returns the configured service type of the memory database configuration.
- getValue() : mixed
- Returns a value for a specific key.
- removeValue() : void
- Removes a specific key from the additional stored values.
- setCacheType() : void
- Sets the cache type to the memory database configuration.
- setCredentials() : void
- Sets the credentials API object to the memory database configuration.
- setSerializeDataFlag() : void
- Defines if the data should be serialized or not.
- shouldSerializeData() : bool
- Whether the data should be serialized.
Methods
__construct()
Defines the constructor of the memory database configuration.
public
final __construct(int $iServiceType) : mixed
It requires a target service type. Possible service types: CSMemoryDatabaseConst::SERVICE_TYPE_*
Parameters
- $iServiceType : int
-
The target service type of the future memory database instance.
Tags
Return values
mixed —addValue()
Adds a value with key & value.
public
addValue(string $sKey, mixed $mValue) : void
Parameters
- $sKey : string
-
The target key of the value.
- $mValue : mixed
-
The value.
Tags
Return values
void —getCacheType()
Returns the configured cache type of the memory database configuration.
public
getCacheType() : string
Tags
Return values
string —getCredentials()
Returns the configured credentials API object of the memory database configuration.
public
getCredentials() : CSMemoryDatabaseCredentials|null
Tags
Return values
CSMemoryDatabaseCredentials|null —getHash()
Returns the unique hash of the memory database configuration to use as cache key.
public
getHash() : string
Tags
Return values
string —getServiceType()
Returns the configured service type of the memory database configuration.
public
getServiceType() : int
Tags
Return values
int —getValue()
Returns a value for a specific key.
public
getValue(string $sKey) : mixed
Parameters
- $sKey : string
-
The target key.
Tags
Return values
mixed —removeValue()
Removes a specific key from the additional stored values.
public
removeValue(string $sKey) : void
Parameters
- $sKey : string
-
The target key.
Tags
Return values
void —setCacheType()
Sets the cache type to the memory database configuration.
public
setCacheType(string $sCacheType) : void
Parameters
- $sCacheType : string
-
The target cache type. Possible cache types: CSCacheUtils::TYPE_*
Tags
Return values
void —setCredentials()
Sets the credentials API object to the memory database configuration.
public
setCredentials(CSMemoryDatabaseCredentials $oCredentials) : void
Parameters
- $oCredentials : CSMemoryDatabaseCredentials
-
The credentials API object with the credentials to connect to the target memory database.
Tags
Return values
void —setSerializeDataFlag()
Defines if the data should be serialized or not.
public
setSerializeDataFlag(bool $bSerializeData) : void
Parameters
- $bSerializeData : bool
-
Whether the data should be serialized.
Tags
Return values
void —shouldSerializeData()
Whether the data should be serialized.
public
shouldSerializeData() : bool
