@param StorageInterface $storage
Parameters: | integer – |
---|
Loop over the queue of storage until a storage is found that is non-empty. If such storage is not found, then this chain storage itself is empty.
In case a non-empty storage is found then this chain storage is also non-empty. Report that, but also make sure that all storage with higher priorty that are empty are filled.
If the chain is non-empty then the storage with the top priority is guaranteed to be filled. Return its value.
Write the new $contents to all storage in the chain.
Clear all storage in the chain.