MemoryStoreQueue
Provides access to a queue within MemoryStore.
Memory category | Instances |
---|
Member index 3
Description
Provides access to a queue within MemoryStore. A queue is a data structure that provides temporary storage for arbitrary items (up to the maximum item size -- see MemoryStore Limits). Each queue item has a numeric priority: MemoryStore retrieves items with higher priority from the queue first, and it retrieves Items with the same priority in order of addition.
Items in the queue can optionally be set to expire after a certain amount of time. Expired items simply disappear from the queue as if they were never added.
History 11
- 573 Change ReturnType of RemoveAsync from void to null
- 573 Change ReturnType of AddAsync from void to null
- 487 Change Parameters of AddAsync from (value: Variant, priority: double = 0, expiration: int64 = -1) to (value: Variant, expiration: int64, priority: double = 0)
- 481 Change Parameters of ReadAsync from (count: int, allOrNothing: bool = false, waitTimeout: double = 0) to (count: int, allOrNothing: bool = false, waitTimeout: double = -1)
- 477 Change Parameters of ReadAsync from (count: int, allOrNothing: bool = false, waitTimeout: int = 0) to (count: int, allOrNothing: bool = false, waitTimeout: double = 0)
- 477 Change Parameters of AddAsync from (value: Variant, priority: int = 0, expiration: int = -1) to (value: Variant, priority: double = 0, expiration: int64 = -1)
- 475 Change Parameters of ReadAsync from (count: int, allOrNothing: bool = false, waitTimeout: int = -1) to (count: int, allOrNothing: bool = false, waitTimeout: int = 0)
- 474 Add RemoveAsync
- 474 Add ReadAsync
- 474 Add AddAsync
- 474 Add MemoryStoreQueue
Members 3
AddAsync
Parameters (3) | Default | |
---|---|---|
value | Variant | |
expiration | int64 | |
priority | double | 0 |
Returns (1) | ||
null |
Adds an item to the queue.
Thread safety | Unsafe |
---|
History 4
- 573 Change ReturnType of AddAsync from void to null
- 487 Change Parameters of AddAsync from (value: Variant, priority: double = 0, expiration: int64 = -1) to (value: Variant, expiration: int64, priority: double = 0)
- 477 Change Parameters of AddAsync from (value: Variant, priority: int = 0, expiration: int = -1) to (value: Variant, priority: double = 0, expiration: int64 = -1)
- 474 Add AddAsync
ReadAsync
Parameters (3) | Default | |
---|---|---|
count | int | |
allOrNothing | bool | false |
waitTimeout | double | -1 |
Returns (1) | ||
Tuple |
Reads one or more items from the queue as a single atomic operation.
This method does not automatically delete the returned items from the queue but makes them invisible to other ReadAsync calls for the period of the invisibility timeout. The items must be explicitly removed from the queue with MemoryStoreQueue:RemoveAsync() before the invisibility timeout expires. The invisibility timeout defaults to 30 seconds unless a different value was provided in MemoryStoreService:GetQueue().
Thread safety | Unsafe |
---|
History 4
- 481 Change Parameters of ReadAsync from (count: int, allOrNothing: bool = false, waitTimeout: double = 0) to (count: int, allOrNothing: bool = false, waitTimeout: double = -1)
- 477 Change Parameters of ReadAsync from (count: int, allOrNothing: bool = false, waitTimeout: int = 0) to (count: int, allOrNothing: bool = false, waitTimeout: double = 0)
- 475 Change Parameters of ReadAsync from (count: int, allOrNothing: bool = false, waitTimeout: int = -1) to (count: int, allOrNothing: bool = false, waitTimeout: int = 0)
- 474 Add ReadAsync
RemoveAsync
Parameters (1) | ||
---|---|---|
id | string | |
Returns (1) | ||
null |
Removes an item or items previously read from the queue. This method uses the identifier returned by MemoryStoreQueue:ReadAsync() to identify the items to remove. If called after the invisibility timeout has expired, the call has no effect.
Thread safety | Unsafe |
---|
History 2
- 573 Change ReturnType of RemoveAsync from void to null
- 474 Add RemoveAsync