public function __construct($msgQid, $queueDepth, $maxMsgSize, $bUseShmQ = false) { $this->msgQid = $msgQid; $lockFile = LsSys::GetEcosphereIpcLockFile(LsSys::ECO_IPC_QUEUE_ID); // // Just use SVR4 IPC message queues if it's defined. // if (@function_exists(msg_get_queue) && $bUseShmQ == false) { $this->mQ = msg_get_queue($msgQid); } else { $this->bIsShmQ = true; $this->mQ = LsShmQueue::Factory($msgQid, $queueDepth, $queueDepth * $maxMsgSize, $lockFile); } }
public function __construct($keyId, $cacheSize = 0) { // // This means we're just instancing the basics to communicate with // the lock file and the catalog. The actual size of the objects // will be discovered. // $this->pageSize = LsTinyCache::PAGE_SIZE; if ($cacheSize == 0) { $this->discoveryMode = LsTinyCache::AUTO; $this->cacheSize = 0; $this->numPages = 0; } else { $this->cacheSize = LsRoundUp($cacheSize, $this->pageSize); $this->numPages = $this->cacheSize / $this->pageSize; } $this->catalogShmKey = $keyId; $this->cacheShmKey = $keyId + 4096; $this->lockFileName = LsSys::GetEcosphereIpcLockFile($keyId); }