Pillarbox
public class Pillarbox<Element> where Element : Decodable, Element : EncodableA object-based queue which is persisted to the disk. Supports both FIFO and LIFO strategies. Should be thread-safe as well.
- 
                  
                  Initializes and returns a newly allocated Pillarbox. DeclarationSwift @inlinable public init( name: String, url: URL, configuration: PillarboxConfiguration = PillarboxConfiguration() )ParametersnameThe name of the queue file urlThe url of the directory to create the queue file in configurationThe Pillarbox configuration 
- 
                  
                  Retrieves, but does not remove, the head of the queue, or returns nilf the queue is empty. If the strategy isfifo, the first inserted item will be returned, forlifoit will be the last one.DeclarationSwift @inlinable func peek() -> Element?Return ValueThe retrieved element or nil
- 
                  
                  Retrieves and removes the head of the queue, or returns nilif the queue is empty. Writes the updated queue to the disk and removes the persisted element. If the strategy isfifo, the first inserted item will be returned, forlifoit will be the last one.DeclarationSwift @discardableResult @inlinable func pop() -> Element?Return ValueThe retrieved element or nil
- 
                  
                  Pushes the specified element into the queue and persist it on the disk. DeclarationSwift @discardableResult @inlinable func push(_ element: Element) -> StringParameterselementThe element to push into the queue. Return ValueThe key which identifies the element 
- 
                  
                  A Boolean value indicating whether the queue is empty. DeclarationSwift @inlinable var isEmpty: Bool { get }
- 
                  
                  The number of elements in the queue. DeclarationSwift @inlinable var count: Int { get }
- 
                  
                  All elements in the queue DeclarationSwift @inlinable var elements: [Element] { get }
- 
                  
                  Undocumented DeclarationSwift @inlinable subscript(key: String) -> Element? { get }
 View on GitHub
            View on GitHub
           Pillarbox Class Reference
      Pillarbox Class Reference