Model
State
Magento\Indexer\Model\Indexer\State
What it does
This class manages the state of individual indexers in Magento 2, tracking their status (invalid, valid, working) and last update time.
Developers use this model to check if an indexer is currently running, mark it as working or invalid, and persist state information to the database.
It includes locking mechanisms to prevent concurrent indexer execution when application locks are enabled.
Public Methods
- getIndexerId()
- setIndexerId()
- getStatus()
- getUpdated()
- setUpdated()
- loadByIndexer()
- setStatus()
- beforeSave()