public function queue(Operations $operations)
    {
        foreach ($operations->getOperations() as $operation) {
            if ($operation instanceof AddDocumentOperation) {
                $identity = $operation->getDocument()->getIdentity();
                $job = new Job('indexer:add', array((string) $identity));
            } elseif ($operation instanceof AddIdentityOperation) {
                $identity = $operation->getIdentity();
                $job = new Job('indexer:add', array((string) $identity));
            } elseif ($operation instanceof UpdateDocumentOperation) {
                $identity = $operation->getDocument()->getIdentity();
                $job = new Job('indexer:add', array('--update', (string) $identity));
            } elseif ($operation instanceof UpdateIdentityOperation) {
                $identity = $operation->getIdentity();
                $job = new Job('indexer:add', array('--update', (string) $identity));
            } elseif ($operation instanceof DeleteDocumentOperation) {
                $identity = $operation->getDocument()->getIdentity();
                $job = new Job('indexer:delete', array('--identifier', (string) $identity));
            } elseif ($operation instanceof DeleteIdentityOperation) {
                $identity = $operation->getIdentity();
                $job = new Job('indexer:delete', array('--identifier', (string) $identity));
            } elseif ($operation instanceof DeleteTypeOperation) {
                $job = new Job('indexer:delete', array('--type', $operation->getType()));
            } elseif ($operation instanceof DeleteAllOperation) {
                $job = new Job('indexer:delete', array('--all'));
            } elseif ($operation instanceof FlushOperation) {
                $job = new Job('indexer:index', array('--flush'));
            } elseif ($operation instanceof OptimizeOperation) {
                $job = new Job('indexer:index', array('--optimize'));
            } elseif ($operation instanceof CommitOperation) {
                $job = new Job('indexer:index', array('--commit'));
            } elseif ($operation instanceof RollbackOperation) {
                $job = new Job('indexer:index', array('--rollback'));
            } else {
                continue;
            }

            $this->jobManager->addJob($job);
        }

        return true;
    }