Queue/Adapter/AdapterInterface.php
Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled
with this package in the file LICENSE.txt.
It is also available through the world-wide-web at this URL:
http://framework.zend.com/license/new-bsd
If you did not receive a copy of the license and are unable to
obtain it through the world-wide-web, please send an email
to
[email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Queue
- Subpackage
- Adapter
- Version
- $Id$
\Zend_Queue_Adapter_AdapterInterface
Package: Zend_Queue\AdapterInterface for common queue operations
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods
create(string $name, integer $timeout = null) : boolean
Visibility timeout is how long a message is left in the queue
"invisible" to other readers. If the message is acknowleged (deleted)
before the timeout, then the message is deleted. However, if the
timeout expires then the message will be made available to other queue
readers.
ParametersName | Type | Description |
---|
$name | string | Queue name |
---|
$timeout | integer | Default visibility timeout |
---|
Returnsdelete(string $name) : boolean
Delete a queue and all of its messages
Return false if the queue is not found, true if the queue exists.
ParametersName | Type | Description |
---|
$name | string | Queue name |
---|
ReturnsdeleteMessage(\Zend_Queue_Message $message) : boolean
Delete a message from the queue
Return true if the message is deleted, false if the deletion is
unsuccessful.
ParametersReturnsgetCapabilities() : array
Return a list of queue capabilities functions
$array['function name'] = true or false
true is supported, false is not supported.
ReturnsgetQueues() : array
Get an array of all available queues
Not all adapters support getQueues(); use isSupported('getQueues')
to determine if the adapter supports this feature.
ReturnsisExists(string $name) : boolean
Does a queue already exist?
Use isSupported('isExists') to determine if an adapter can test for
queue existance.
ParametersName | Type | Description |
---|
$name | string | Queue name |
---|
ReturnsisSupported(string $name) : boolean
Indicates if a function is supported or not.
ParametersName | Type | Description |
---|
$name | string | Function name |
---|
Returns receive(integer | null $maxMessages = null, integer | null $timeout = null, \Zend_Queue | null $queue = null) : \Zend_Queue_Message_Iterator
Get messages in the queue
ParametersName | Type | Description |
---|
$maxMessages | integer | null | Maximum number of messages to return |
---|
$timeout | integer | null | Visibility timeout for these messages |
---|
$queue | \Zend_Queue | null | |
---|
Returns send(mixed $message, \Zend_Queue | null $queue = null) : \Zend_Queue_Message
Send a message to the queue
ParametersName | Type | Description |
---|
$message | mixed | Message to send to the active queue |
---|
$queue | \Zend_Queue | null | |
---|
Returns