How does Magento 2 generate the next order increment id?

Context: How does a shipment saving work?

0.74.0-beta4 (Apr 10, 2015)

https://github.com/magento/magento2/blob/d50ee5/CHANGELOG.md#L945-L945


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php#L120-L133


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/Manager.php#L37-L53


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php#L61-L61


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/ResourceModel/Meta.php#L72-L89


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/Sales/Model/ResourceModel/EntityAbstract.php#L128-L128


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/Sequence.php#L75-L85

sequence_order_1:

https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/Sequence.php#L56-L73


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/Sequence.php#L46-L54


https://github.com/magento/magento2/blob/d50ee5/app/code/Magento/SalesSequence/Model/Sequence.php#L16-L19