PHP Class Jamm\Memory\Shm\ShmMem

Inheritance: extends SingleMemory
Show file Open project: jamm/memory

Protected Properties

Property Type Description
$id
$max_size
$shm
$shmkey
$shmsize

Public Methods

Method Description
__construct ( string $ID = '', integer $size, integer $maxsize )
__destruct ( )
del_mem_block ( )
get_ID ( )
get_stat ( )
set_ID ( $ID )

Protected Methods

Method Description
readmemory ( ) : mixed Read data from memory storage
refresh ( ) : boolean | integer Synchronize data with memory storage
resize ( integer $size ) : boolean Resize memory block

Method Details

__construct() public method

public __construct ( string $ID = '', integer $size, integer $maxsize )
$ID string by default is __FILE__
$size integer initial size
$maxsize integer maximum allowed size

__destruct() public method

public __destruct ( )

del_mem_block() public method

public del_mem_block ( )

get_ID() public method

public get_ID ( )

get_stat() public method

public get_stat ( )

readmemory() protected method

Read data from memory storage
protected readmemory ( ) : mixed
return mixed

refresh() protected method

Synchronize data with memory storage
protected refresh ( ) : boolean | integer
return boolean | integer

resize() protected method

Resize memory block
protected resize ( integer $size ) : boolean
$size integer
return boolean

set_ID() public method

public set_ID ( $ID )

Property Details

$id protected property

protected $id

$max_size protected property

protected $max_size

$shm protected property

protected $shm

$shmkey protected property

protected $shmkey

$shmsize protected property

protected $shmsize