Skip to content
Roblox API Reference

MemoryStoreQueue

Provides access to a queue within MemoryStore.
  • Not creatable
  • Not replicated
Memory category
Instances
Own members
4
Inherited members
75
Subclasses
0
Siblings
608

Properties23

Inherited fromObject2

Property categoryData

Inherited fromInstance21

Property categoryBehavior

Property categoryData

Property categoryPermissions

Methods46

Inherited fromObject3
  • Get an event that fires when a given property of the object changes.
    Parameters
    ParameterDescription
    property: string
    The property to connect to.
    Returns
    TypeDescription
    RBXScriptSignal
    A signal that fires whenever the property changes.
  • Object:IsA(className: string): boolean
    Returns true if an object's class matches or inherits from a given class.
    • Custom Lua state
    • Thread safe
    Parameters
    ParameterDescription
    className: string
    The class against which the Object's class will be checked. Case-sensitive.
    Returns
    TypeDescription
    boolean
    Describes whether the Object's class matched or is a subclass of the given class.
  • Object:isA(className: string): boolean
    Deprecated: This deprecated function is a variant of Object:IsA() which should be used instead.
    • Deprecated
    • Custom Lua state
    Parameters
    Parameter
    className: string
    Returns
    Type
    boolean

    Use IsA instead.

Inherited fromInstance39
Defined byMemoryStoreQueue4
  • MemoryStoreQueue:AddAsync(value: any, expiration: number, priority: number? = 0)
    Adds an item to the queue.
    • Yields
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    value: any
    The value of the item to add to the queue.
    expiration: number
    Item expiration time, in seconds, after which the item will be automatically removed from the queue.
    priority: number? = 0
    Item priority. Items with higher priority are retrieved from the queue before items with lower priority.
  • MemoryStoreQueue:GetSizeAsync(excludeInvisible: boolean? = false): number
    Gets the size of the queue.
    • Yields
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    excludeInvisible: boolean? = false
    Determines whether to exclude invisible items from the size count.
    Returns
    TypeDescription
    number
    The number of items currently in the queue. Items that have been read but not yet removed (invisible items) are included in the count unless excludeInvisible is true.
  • MemoryStoreQueue:ReadAsync(count: number,allOrNothing: boolean? = false,waitTimeout: number? = -1,): ...any
    Reads one or more items from the queue.
    • Yields
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    count: number
    Number of items to read. The maximum allowed value of this parameter is 100.
    allOrNothing: boolean? = false
    Controls the behavior of the method in the case the queue has fewer than count items: if set to false the method returns all available items; if set to true, it returns no items. The default value is false.
    waitTimeout: number? = -1
    The duration, in seconds, for which the method will wait if the required number of items is not immediately available in the queue. Reads are attempted every two seconds during this period. This parameter can be set to zero to indicate no wait. If this parameter is not provided or set to -1, the method will wait indefinitely.
    Returns
    TypeDescription
    ...any
    A tuple of two elements. The first element is an array of item values read from the queue. The second element is a string identifier that should be passed to MemoryStoreQueue:RemoveAsync() to permanently remove these items from the queue.
  • MemoryStoreQueue:RemoveAsync(id: string)
    Removes an item or items previously read from the queue.
    • Yields
    • Capabilities: DataStore
    Parameters
    ParameterDescription
    id: string
    Identifies the items to delete. Use the value returned by MemoryStoreQueue:ReadAsync().

Events10

Inherited fromObject1
Inherited fromInstance9