MatrixBerryCore
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
mxberry::core::cont::ondisk::AHashMap Class Reference

DISKBASEDHASHMAP represents a hash map for the arbitrary objects on disk with a high level of persistency when the object state can be restored based only on a storage location. More...

Inheritance diagram for mxberry::core::cont::ondisk::AHashMap:
Inheritance graph
[legend]
Collaboration diagram for mxberry::core::cont::ondisk::AHashMap:
Collaboration graph
[legend]

Public Member Functions

function getIsHashedPath (in self)
 
function getIsHashedKeys (in self)
 
function AHashMap (in varargin)
 ADISKBASEDHASHMAP. More...
 
function getFileNameByKey (in self, in keyStr, in varargin)
 GETFILENAMEBYKEY returns a full file name by key. More...
 
function isKey (in self, in keyList)
 ISKEY checks if the specified keys are registered. More...
 
function getStorageBranchKey (in self)
 GETSTORAGEBRANCHKEY Input: regular: self: Output: branchKey: char[1,] - current branch key. More...
 
function getStorageLocationRoot (in self)
 GETSTORAGELOCATION returns a storage location root for the object in question. More...
 
function getStorageLocation (in self)
 GETSTORAGELOCATION returns a storage location for the object in question. More...
 
function put (in self, in keyList, in valueObjList, in varargin)
 PUT inserts a set of values into the map. More...
 
function get (in self, in keyList, in varargin)
 GET extracts a set of values from the map. More...
 
function getKeyList (in self)
 GETKEYLIST returns a list of key values in the given map. More...
 
function remove (in self, in keyList)
 REMOVE removes the key-value pairs from the map for a specified set of keys, method is silent if no such key exist. More...
 
function removeAll (in self)
 REMOVEALL removes all key-value pairs from the map. More...
 

Protected Member Functions

function checkKey (in self, in fileName)
 
function removeOne (in self, in keyStr)
 
function genfullfilename (in self, in keyStr)
 
function putOne (in self, in keyStr, in valueObj)
 
function getOne (in self, in keyStr)
 
function isStorageDir (in self, in dirName)
 
function checkStorageDir (in self, in dirName)
 
function genfilename (in self, in inpStr)
 

Static Protected Member Functions

static function isFileExt (in fileNameList, in extList)
 

Protected Attributes

Constant Property IGNORE_EXTENSIONS
 
Constant Property ALLOWED_EXTENSIONS
 
Property storageLocation
 
Property storageLocationRoot
 
Property isPutErrorIgnored
 
Property isBrokenStoredValuesIgnored
 
Property fileExtension
 
Property isHashedPath
 
Property isHashedKeys
 
Property saveFunc
 
Property loadKeyFunc
 
Property loadValueFunc
 
Property storageFormat
 
Property isMissingKeyBlamed
 
Property isStorageContentChecked
 
Property storageBranchKey
 

Detailed Description

DISKBASEDHASHMAP represents a hash map for the arbitrary objects on disk with a high level of persistency when the object state can be restored based only on a storage location.

Definition at line 6 of file AHashMap.m.

Constructor & Destructor Documentation

◆ AHashMap()

function mxberry::core::cont::ondisk::AHashMap::AHashMap ( in  varargin)

ADISKBASEDHASHMAP.

Author
Peter Gagarinov, PhD pgaga.nosp@m.rino.nosp@m.v@gma.nosp@m.il.c.nosp@m.om

Member Function Documentation

◆ checkKey()

function mxberry::core::cont::ondisk::AHashMap::checkKey ( in  self,
in  fileName 
)
protected

◆ checkStorageDir()

function mxberry::core::cont::ondisk::AHashMap::checkStorageDir ( in  self,
in  dirName 
)
protected

◆ genfilename()

function mxberry::core::cont::ondisk::AHashMap::genfilename ( in  self,
in  inpStr 
)
protected

◆ genfullfilename()

function mxberry::core::cont::ondisk::AHashMap::genfullfilename ( in  self,
in  keyStr 
)
protected

◆ get()

function mxberry::core::cont::ondisk::AHashMap::get ( in  self,
in  keyList,
in  varargin 
)

GET extracts a set of values from the map.

*  Usage: valueObjVec=self.get(keyList)
*         [valueObjList,metaDataList]=self.get(keyList,'UniformOutput',false)
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
*        keyList: cell[1,nKeys] - cell array of character key
*           values
* 
*    properties:
*        uniformOutput: logical[1,1]
*           true means that the
*              result for multiple key values is returned in an array
*               of objects. If the returned objects do not support
*               concatenation in arrays, an exception is thrown.
*           false enables place each of the objects in a
*              separate cell
* 
*  Output:
*    regular:
*        valueObjList: any[1,nKeys] - cell array/array of objects of
*           any type
*    optional:
*        arg1: any[1,nKeys] any additional output arguments returned
*            by an overriden getOne method
*            . . .
*        argN: any[1,nKeys] any additional output arguments
*           returned by an overriden getOne method
* 

◆ getFileNameByKey()

function mxberry::core::cont::ondisk::AHashMap::getFileNameByKey ( in  self,
in  keyStr,
in  varargin 
)

GETFILENAMEBYKEY returns a full file name by key.

*  Usage: self.getFileNameByKey(keyList)
* 
*  Input:
*    regular:
*        keyStr: char[1,] - key
*    properties:
*        checkForPresence: logical[1,1] - if true (default), the
*            presence of the specified key is checked. If the
*            key is not present an exception is thrown
* 
*  Output:
*    fullFileName: char[1,] - full file name
*        corresponding to a specified key
* 

◆ getIsHashedKeys()

function mxberry::core::cont::ondisk::AHashMap::getIsHashedKeys ( in  self)

◆ getIsHashedPath()

function mxberry::core::cont::ondisk::AHashMap::getIsHashedPath ( in  self)

◆ getKeyList()

function mxberry::core::cont::ondisk::AHashMap::getKeyList ( in  self)

GETKEYLIST returns a list of key values in the given map.

*  Usage: keyList=self.getKeyList()
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
*  Output:
*    keyList: cell[1,nKeys] - cell array of character key
*        values
* 

◆ getOne()

function mxberry::core::cont::ondisk::AHashMap::getOne ( in  self,
in  keyStr 
)
protected

◆ getStorageBranchKey()

function mxberry::core::cont::ondisk::AHashMap::getStorageBranchKey ( in  self)

GETSTORAGEBRANCHKEY Input: regular: self: Output: branchKey: char[1,] - current branch key.

◆ getStorageLocation()

function mxberry::core::cont::ondisk::AHashMap::getStorageLocation ( in  self)

GETSTORAGELOCATION returns a storage location for the object in question.

*  Usage: self.getStorageLocation()
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
*  Output:
*    regular:
*        storageLocation: char[1,nChars] - storage location
*            directory on a disk (includes a branch key)
* 

◆ getStorageLocationRoot()

function mxberry::core::cont::ondisk::AHashMap::getStorageLocationRoot ( in  self)

GETSTORAGELOCATION returns a storage location root for the object in question.

*  Usage: self.getStorageLocation()
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
*  Output:
*    regular:
*        storageLocationRoot: char[1,nChars] - storage location
*            directory on a disk (includes a branch key)
* 

◆ isFileExt()

static function mxberry::core::cont::ondisk::AHashMap::isFileExt ( in  fileNameList,
in  extList 
)
staticprotected

◆ isKey()

function mxberry::core::cont::ondisk::AHashMap::isKey ( in  self,
in  keyList 
)

ISKEY checks if the specified keys are registered.

*  Usage: self.isKey(keyList)
* 
*  Input:
*    regular:
*        keyList: cell[1,nKeys] - cell array of character key
*           values
* 
*  Output:
*    regular:
*        isKeyVec: logical[1,nKeys] - 'is key' indicator array
*        fullFileNameCVec: cell[1,nKeys] - a list of full file
*           names where the values for each key are stored
* 

◆ isStorageDir()

function mxberry::core::cont::ondisk::AHashMap::isStorageDir ( in  self,
in  dirName 
)
protected

◆ put()

function mxberry::core::cont::ondisk::AHashMap::put ( in  self,
in  keyList,
in  valueObjList,
in  varargin 
)

PUT inserts a set of values into the map.

*  Usage: self.put(keyList,valueObjList)
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
*        keyList: cell[1,nKeys] - cell array of character key
*           values
*        valueObjList: any[1,nKeys] - cell array of objects of
*           any type
* 
*  Output:
* 

◆ putOne()

function mxberry::core::cont::ondisk::AHashMap::putOne ( in  self,
in  keyStr,
in  valueObj 
)
protected

◆ remove()

function mxberry::core::cont::ondisk::AHashMap::remove ( in  self,
in  keyList 
)

REMOVE removes the key-value pairs from the map for a specified set of keys, method is silent if no such key exist.

*  Usage: valueObjList=self.remove(keyList)
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
*        keyList: cell[1,nKeys] - cell array of character key
*           values
* 

◆ removeAll()

function mxberry::core::cont::ondisk::AHashMap::removeAll ( in  self)

REMOVEALL removes all key-value pairs from the map.

*  Usage: self.removeAll()
* 
*  Input:
*    regular:
*        self: DiskBasedHashMap[1,1] - the object itself
* 

◆ removeOne()

function mxberry::core::cont::ondisk::AHashMap::removeOne ( in  self,
in  keyStr 
)
protected

Member Data Documentation

◆ ALLOWED_EXTENSIONS

Constant Property mxberry::core::cont::ondisk::AHashMap::ALLOWED_EXTENSIONS
protected

Definition at line 14 of file AHashMap.m.

◆ fileExtension

Property mxberry::core::cont::ondisk::AHashMap::fileExtension
protected

Definition at line 27 of file AHashMap.m.

◆ IGNORE_EXTENSIONS

Constant Property mxberry::core::cont::ondisk::AHashMap::IGNORE_EXTENSIONS
protected

Definition at line 12 of file AHashMap.m.

◆ isBrokenStoredValuesIgnored

Property mxberry::core::cont::ondisk::AHashMap::isBrokenStoredValuesIgnored
protected

Definition at line 25 of file AHashMap.m.

◆ isHashedKeys

Property mxberry::core::cont::ondisk::AHashMap::isHashedKeys
protected

Definition at line 31 of file AHashMap.m.

◆ isHashedPath

Property mxberry::core::cont::ondisk::AHashMap::isHashedPath
protected

Definition at line 29 of file AHashMap.m.

◆ isMissingKeyBlamed

Property mxberry::core::cont::ondisk::AHashMap::isMissingKeyBlamed
protected

Definition at line 41 of file AHashMap.m.

◆ isPutErrorIgnored

Property mxberry::core::cont::ondisk::AHashMap::isPutErrorIgnored
protected

Definition at line 23 of file AHashMap.m.

◆ isStorageContentChecked

Property mxberry::core::cont::ondisk::AHashMap::isStorageContentChecked
protected

Definition at line 43 of file AHashMap.m.

◆ loadKeyFunc

Property mxberry::core::cont::ondisk::AHashMap::loadKeyFunc
protected

Definition at line 35 of file AHashMap.m.

◆ loadValueFunc

Property mxberry::core::cont::ondisk::AHashMap::loadValueFunc
protected

Definition at line 37 of file AHashMap.m.

◆ saveFunc

Property mxberry::core::cont::ondisk::AHashMap::saveFunc
protected

Definition at line 33 of file AHashMap.m.

◆ storageBranchKey

Property mxberry::core::cont::ondisk::AHashMap::storageBranchKey
protected

Definition at line 45 of file AHashMap.m.

◆ storageFormat

Property mxberry::core::cont::ondisk::AHashMap::storageFormat
protected

Definition at line 39 of file AHashMap.m.

◆ storageLocation

Property mxberry::core::cont::ondisk::AHashMap::storageLocation
protected

Definition at line 19 of file AHashMap.m.

◆ storageLocationRoot

Property mxberry::core::cont::ondisk::AHashMap::storageLocationRoot
protected

Definition at line 21 of file AHashMap.m.


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