Inherits from NSObject
Declared in RKMappingOperationQueue.h
RKMappingOperationQueue.m

Overview

Provides a simple interface for deferring portion of an larger object mapping operation until the entire aggregate operation has completed. This is used by Core Data to connect all object relationships once the entire object graph has been mapped, rather than as each object is encountered.

Designed as a lightweight workalike for NSOperationQueue, which was not usable do to its reliance on threading for concurrent operations. The threading was causing problems with managed objects due to MOC being thread specific.

This class is not intended to be thread-safe and is used for queueing non-concurrent operations that will be executed within the object mapper only. It is not a general purpose work queue.

Tasks

Instance Methods

addOperation:

Adds an NSOperation to the queue for later execution

- (void)addOperation:(NSOperation *)op

Parameters

op

The operation to enqueue

Declared In

RKMappingOperationQueue.h

addOperationWithBlock:

Adds an NSBlockOperation to the queue configured to executed the block passed

- (void)addOperationWithBlock:(void ( ^ ) ( void ))block

Parameters

block

A block to wrap into an operation for later execution

Declared In

RKMappingOperationQueue.h

operationCount

Returns the number of operations in the queue

- (NSUInteger)operationCount

Return Value

The number of operations in the queue.

Declared In

RKMappingOperationQueue.h

operations

Returns the collection of operations in the queue

- (NSArray *)operations

Return Value

A new aray containing the NSOperation objects in the order in which they were added to the queue

Declared In

RKMappingOperationQueue.h

waitUntilAllOperationsAreFinished

Starts the execution of all operations in the queue in the order in which they were added to the queue. The current threads execution will be blocked until all enqueued operations have returned.

- (void)waitUntilAllOperationsAreFinished

Declared In

RKMappingOperationQueue.h