CSMemoryDatabaseMemcacheService
extends _CSMemoryDatabaseService
in package
Defines the abstract class for the memory database services.
The class provides the base object with getter method to receive information for a specific service type.
Tags
Table of Contents
- __construct() : mixed
- Defines the constructor of the memory database service.
- deleteItem() : bool
- Deletes a memory database item for a given key.
- getConfiguration() : CSMemoryDatabaseConfiguration
- Returns the given & stored configuration of the memory database service.
- getItem() : CSMemoryDatabaseItem
- Returns the memory database item for the given key.
- getMode() : int
- Returns the current mode of the service.
- getResponseTime() : float|null
- Receives the current response time in micro seconds of the service.
- getSessionHandler() : CSMemoryDatabaseSessionHandler|null
- Returns a session handler API object if the service provides a separate session handling.
- getVersion() : string
- Receives version information from the service.
- invalidate() : bool
- Invalidate memory database items for specific given tag names.
- isConnected() : bool
- Checks if the service is connected.
- isEnabled() : bool
- Checks if the service is enabled.
- isMode() : bool
- Checks if the given mode is active in the memory database service.
- prepareErrorMessage() : void
- Provides the possibility to modify / prepare error message specific for a service type.
- setItem() : bool
- Sets & stores a given memory database item to the service storage.
Methods
__construct()
Defines the constructor of the memory database service.
public
final __construct(string $sServiceName, CSMemoryDatabaseConfiguration $oConfiguration) : mixed
Parameters
- $sServiceName : string
-
The target service name of the memory database service.
- $oConfiguration : CSMemoryDatabaseConfiguration
-
The configuration API object to initialize the service.
Tags
Return values
mixed —deleteItem()
Deletes a memory database item for a given key.
public
deleteItem(string $sKey) : bool
Parameters
- $sKey : string
-
The target key of the item.
Tags
Return values
bool —getConfiguration()
Returns the given & stored configuration of the memory database service.
public
final getConfiguration() : CSMemoryDatabaseConfiguration
Tags
Return values
CSMemoryDatabaseConfiguration —getItem()
Returns the memory database item for the given key.
public
getItem(string $sKey) : CSMemoryDatabaseItem
Parameters
- $sKey : string
-
The target key of the item.
Tags
Return values
CSMemoryDatabaseItem —getMode()
Returns the current mode of the service.
public
getMode() : int
Tags
Return values
int —getResponseTime()
Receives the current response time in micro seconds of the service.
public
getResponseTime() : float|null
Tags
Return values
float|null —getSessionHandler()
Returns a session handler API object if the service provides a separate session handling.
public
getSessionHandler() : CSMemoryDatabaseSessionHandler|null
Tags
Return values
CSMemoryDatabaseSessionHandler|null —getVersion()
Receives version information from the service.
public
getVersion() : string
Tags
Return values
string —invalidate()
Invalidate memory database items for specific given tag names.
public
invalidate([array<string|int, mixed> $aTags = [] ]) : bool
Parameters
- $aTags : array<string|int, mixed> = []
-
An array with tag names that should be deleted.
Tags
Return values
bool —isConnected()
Checks if the service is connected.
public
isConnected() : bool
Tags
Return values
bool —isEnabled()
Checks if the service is enabled.
public
isEnabled() : bool
Tags
Return values
bool —isMode()
Checks if the given mode is active in the memory database service.
public
final isMode(int $iMode) : bool
Parameters
- $iMode : int
-
The mode, which should be checked. Please use the constants "CSMemoryDatabaseConst::MODE_"
Tags
Return values
bool —prepareErrorMessage()
Provides the possibility to modify / prepare error message specific for a service type.
public
prepareErrorMessage(string &$sMessage, int $iErrorType, bool &$bShowTrace) : void
Parameters
- $sMessage : string
-
The original error message.
- $iErrorType : int
-
The error type.
- $bShowTrace : bool
-
Whether the trace should be shown for the corresponding error message.
Tags
Return values
void —setItem()
Sets & stores a given memory database item to the service storage.
public
setItem(CSMemoryDatabaseItem $oItem) : bool
Parameters
- $oItem : CSMemoryDatabaseItem
-
The target item, which should be stored to the service storage.
