PHP 클래스 Jenner\SimpleFork\Queue\SystemVMessageQueue

상속: implements Jenner\SimpleFork\Queue\QueueInterface
파일 보기 프로젝트 열기: huyanping/simple-fork-php

보호된 프로퍼티들

프로퍼티 타입 설명
$block_send boolean
$ipc_filename string
$key_t
$maxsize integer
$msg_type channel
$option_receive integer
$queue
$serialize_needed boolean

공개 메소드들

메소드 설명
__construct ( string $ipc_filename = __FILE__, integer $channel = 1, boolean $serialize_needed = true, boolean $block_send = true, integer $option_receive = MSG_IPC_NOWAIT, integer $maxsize = 100000 )
__destruct ( )
__wakeup ( ) init when wakeup
get ( boolean $block = false ) : boolean | string get message
getIpcKey ( $ipc_filename, $msg_type ) : integer
put ( $message ) : boolean put message
queueExists ( $key ) : boolean check if the queue is exists or not
remove ( ) : boolean remove queue
setMaxQueueSize ( $size ) : boolean update the max size of queue need root
setStatus ( string $key, integer $value ) : boolean allows you to change the values of the msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the underlying message queue data structure
size ( ) : mixed get the size of queue
status ( )

보호된 메소드들

메소드 설명
initQueue ( $ipc_filename, $msg_type ) init queue

비공개 메소드들

메소드 설명
checkSetPrivilege ( $key ) check the privilege of update the queue's status

메소드 상세

__construct() 공개 메소드

public __construct ( string $ipc_filename = __FILE__, integer $channel = 1, boolean $serialize_needed = true, boolean $block_send = true, integer $option_receive = MSG_IPC_NOWAIT, integer $maxsize = 100000 )
$ipc_filename string ipc file to make ipc key. if it does not exists, it will try to create the file.
$channel integer message type
$serialize_needed boolean serialize or not
$block_send boolean if block when the queue is full
$option_receive integer if the value is MSG_IPC_NOWAIT it will not going to wait a message coming. if the value is null, it will block and wait a message
$maxsize integer the max size of queue

__destruct() 공개 메소드

public __destruct ( )

__wakeup() 공개 메소드

init when wakeup
public __wakeup ( )

get() 공개 메소드

get message
public get ( boolean $block = false ) : boolean | string
$block boolean if block when the queue is empty
리턴 boolean | string

getIpcKey() 공개 메소드

public getIpcKey ( $ipc_filename, $msg_type ) : integer
$ipc_filename
$msg_type
리턴 integer

initQueue() 보호된 메소드

init queue
protected initQueue ( $ipc_filename, $msg_type )
$ipc_filename
$msg_type

put() 공개 메소드

put message
public put ( $message ) : boolean
$message
리턴 boolean

queueExists() 공개 메소드

check if the queue is exists or not
public queueExists ( $key ) : boolean
$key
리턴 boolean

remove() 공개 메소드

remove queue
public remove ( ) : boolean
리턴 boolean

setMaxQueueSize() 공개 메소드

update the max size of queue need root
public setMaxQueueSize ( $size ) : boolean
$size
리턴 boolean

setStatus() 공개 메소드

allows you to change the values of the msg_perm.uid, msg_perm.gid, msg_perm.mode and msg_qbytes fields of the underlying message queue data structure
public setStatus ( string $key, integer $value ) : boolean
$key string status key
$value integer status value
리턴 boolean

size() 공개 메소드

get the size of queue
public size ( ) : mixed
리턴 mixed

status() 공개 메소드

public status ( )

프로퍼티 상세

$block_send 보호되어 있는 프로퍼티

protected bool $block_send
리턴 boolean

$ipc_filename 보호되어 있는 프로퍼티

protected string $ipc_filename
리턴 string

$key_t 보호되어 있는 프로퍼티

protected $key_t

$maxsize 보호되어 있는 프로퍼티

protected int $maxsize
리턴 integer

$msg_type 보호되어 있는 프로퍼티

channel
protected $msg_type

$option_receive 보호되어 있는 프로퍼티

protected int $option_receive
리턴 integer

$queue 보호되어 있는 프로퍼티

protected $queue

$serialize_needed 보호되어 있는 프로퍼티

protected bool $serialize_needed
리턴 boolean