Class Claim
A worker claims or checks out a message to perform a task. Doing so prevents
other workers from attempting to process the same messages.
-
OpenCloud\Common\Base
-
OpenCloud\Common\PersistentObject
-
OpenCloud\Queues\Resource\Claim
Methods summary
public
mixed
|
#
setHref( mixed $href )
Set the Href attribute and extrapolate the ID.
Set the Href attribute and extrapolate the ID.
Parameters
Returns
mixed $this
|
public
string
|
|
public
string
|
|
public
HttpResponse
|
#
create( array $params = array() )
Creates a new object
Parameters
- $params
array $params array of values to set when creating the object
Returns
HttpResponse
Throws
VolumeCreateError if HTTP status is not Success
Overrides
|
public
HttpResponse
|
#
update( array $params = array() )
Updates the current Claim. It is recommended that you periodically renew
claims during long-running batches of work to avoid loosing a claim in the
middle of processing a message. This is done by setting a new TTL for the claim
(which may be different from the original TTL). The server will then reset the
age of the claim and apply the new TTL. Updates an existing object
Updates the current Claim. It is recommended that you periodically renew
claims during long-running batches of work to avoid loosing a claim in the
middle of processing a message. This is done by setting a new TTL for the claim
(which may be different from the original TTL). The server will then reset the
age of the claim and apply the new TTL. Updates an existing object
Parameters
- $params
array $params array of values to set when updating the object
Returns
HttpResponse
Throws
VolumeCreateError if HTTP status is not Success
Overrides
|
Methods inherited from OpenCloud\Common\PersistentObject
__construct(),
action(),
checkExtension(),
createJson(),
createUrl(),
delete(),
findLink(),
getClient(),
getMetadata(),
getParent(),
getService(),
getUrl(),
id(),
jsonCollectionElement(),
jsonCollectionName(),
jsonName(),
name(),
noCreate(),
noDelete(),
noUpdate(),
parseResponse(),
primaryKeyField(),
refresh(),
refreshFromLocationUrl(),
region(),
resourceName(),
setMetadata(),
setParent(),
setService(),
status(),
updateJson(),
url(),
waitFor()
|
Methods inherited from OpenCloud\Common\Base
__call(),
checkJsonError(),
generateUuid(),
getLogger(),
getProperty(),
makeResourceIteratorOptions(),
populate(),
propertyExists(),
setLogger(),
setProperty(),
stripNamespace(),
toCamel(),
toUnderscores()
|