K2hash Class
K2hash class provides methods to operation for K2HASH.
See each method pages for details.
Class overview
K2hash {
public addAttr ( string $key , string $attrkey , string $attrval ) : bool
public addAttrCryptPass ( string $encpass [, bool $is_default_encrypt ] ) : bool
public addAttrPluginLib ( string $libfile ) : bool
public addSubkey ( string $key , string $subkey ) : bool
public addSubkeys ( string $key , array $subkeys ) : bool
public cleanCommonAttribute ( void ) : bool
public close ([ int $waitms ] ) : bool
public static create ( string $filepath [, int $maskbitcnt [, int $cmaskbitcnt [, int $maxelementcnt [, int $pagesize ]]]] ) : bool
public disableTransaction ( void ) : bool
public dumpElementtable ([ mixed $output ] ) : bool
public dumpFull ([ mixed $output ] ) : bool
public dumpFullKeytable ([ mixed $output ] ) : bool
public dumpHead ([ mixed $output ] ) : bool
public dumpKeytable ([ mixed $output ] ) : bool
public enableTransaction ([ string $transfile [, string $prefix [, string $param [, int $expire ]]]] ) : bool
public getAttrInfos ([ mixed $output ] ) : bool
public arrayfalsegetAttrs ( string $key )
public stringfalsegetAttrValue ( string $key , string $attrkey )
public getAttrVersionInfos ([ mixed $output ] ) : bool
public getIterator ( string $key ) : mixed
public getKeyQueue ([ bool $is_filo [, string $prefix ]] ) : mixed
public getQueue ([ bool $is_filo [, string $prefix ]] ) : mixed
public getStream ( string $key , string $mode ) : mixed
public arrayfalsegetSubkeys ( string $key [, bool $attrcheck ] )
public static getTransactionThreadPool ( void ) : int
public stringfalsegetValue ( string $key [, string $subkey [, bool $attrcheck [, string $pass ]]] )
public loadArchive ( string $filepath [, bool $errskip ] ) : bool
public open ( string $filepath , bool $readonly [, bool $removefile [, bool $fullmap [, int $maskbitcnt [, int $cmaskbitcnt [, int $maxelementcnt [, int $pagesize ]]]]]] ) : bool
public openMem ([ int $maskbitcnt [, int $cmaskbitcnt [, int $maxelementcnt [, int $pagesize ]]]] ) : bool
public openRO ( string $filepath [, bool $fullmap [, int $maskbitcnt [, int $cmaskbitcnt [, int $maxelementcnt [, int $pagesize ]]]]] ) : bool
public openRW ( string $filepath [, bool $fullmap [, int $maskbitcnt [, int $cmaskbitcnt [, int $maxelementcnt [, int $pagesize ]]]]] ) : bool
public openTempfile ( string $filepath [, bool $fullmap [, int $maskbitcnt [, int $cmaskbitcnt [, int $maxelementcnt [, int $pagesize ]]]]] ) : bool
public printState ([ mixed $output ] ) : bool
public static printVersion ([ mixed $output ] ) : bool
public putArchive ( string $filepath [, bool $errskip ] ) : bool
public remove ( string $key [, string $subkey ] ) : bool
public removeAll ( string $key ) : bool
public rename ( string $key , string $newkey ) : bool
public setCommonAttribute ([ int $is_mtime [, int $is_history [, int $is_encrypt [, string $passfile [, int $is_expire [, int $expire ]]]]]] ) : bool
public static setTransactionThreadPool ( int $count ) : bool
public setValue ( string $key , string $value [, string $subkey [, string $pass [, int $expire ]]] ) : bool
public transaction ( bool $enable [, string $transfile [, string $prefix [, string $param [, int $expire ]]]] ) : bool
public static unsetTransactionThreadPool ( void ) : bool
}
Method list
- K2hash::addAttr - Adds the attribute to the key
- K2hash::addAttrCryptPass - Adds the password to encrypt values
- K2hash::addAttrPluginLib - Adds the user-defined library to handle attributes
- K2hash::addSubkey - Associates the key with the other key
- K2hash::addSubkeys - Adds the subkeys to the key
- K2hash::cleanCommonAttribute - Initializes the common attributes
- K2hash::close - Closes the k2h file
- K2hash::create - Creates the k2h file
- K2hash::disableTransaction - Stops a transaction
- K2hash::dumpElementtable - Prints elements of the k2hash’s hash table elements
- K2hash::dumpFull - Prints the k2hash’s hash tables in details
- K2hash::dumpFullKeytable - Prints details of the k2hash’s hash tables
- K2hash::dumpHead - Prints the k2hash’s headers
- K2hash::dumpKeytable - Prints the k2hash’s hash tables
- K2hash::enableTransaction - Starts a transaction
- K2hash::getAttrInfos - Prints the attribute information
- K2hash::getAttrs - Gets attributes of the key
- K2hash::getAttrValue - Gets an attribute value of the attribute key of the key
- K2hash::getAttrVersionInfos - Prints the attribute library version
- K2hash::getIterator - Gets a K2hIterator object
- K2hash::getKeyQueue - Gets a K2hKeyQueue object
- K2hash::getQueue - Gets a K2hQueue object
- K2hash::getStream - Gets a k2hash file stream
- K2hash::getSubkeys - Gets an array of keys associated with the key
- K2hash::getTransactionThreadPool - Gets the number of transaction workers
- K2hash::getValue - Gets the value associated with the key
- K2hash::loadArchive - Loads data from the file
- K2hash::open - Opens the k2h file
- K2hash::openMem - Attaches k2hash data segments on memory
- K2hash::openRO - Read the k2hash file
- K2hash::openRW - Edit the k2hash file
- K2hash::openTempfile - Edit the k2hash file on temporary file system
- K2hash::printState - Prints k2hash data statistics
- K2hash::printVersion - Prints the k2hash library version
- K2hash::putArchive - Saves data as the archive file
- K2hash::remove - Removes the key
- K2hash::removeAll - Removes the key and the keys associated with the key
- K2hash::rename - Renames the key
- K2hash::setCommonAttribute - Sets the common attributes
- K2hash::setTransactionThreadPool - Sets the number of transaction workers
- K2hash::setValue - Sets the value associated with the key
- K2hash::transaction - Changes transaction settings
- K2hash::unsetTransactionThreadPool - Stops transaction workers