Class

NSAtomicStore

An abstract superclass that you subclass to create a Core Data atomic store.

Declaration

@interface NSAtomicStore : NSPersistentStore

Overview

This class provides default implementations of some utility methods. You use a custom atomic store if you have a custom file format that you want to integrate with a Core Data application.

The atomic stores are all intended to handle data sets that can be expressed in memory. The atomic store API favors simplicity over performance.

Subclassing Notes

Methods to Override

In a subclass of NSAtomicStore, you must override the following methods to provide behavior appropriate for your store:

These are in addition to the methods you must override for a subclass of NSPersistentStore:

Topics

Initializing a Store

- initWithPersistentStoreCoordinator:configurationName:URL:options:

Returns an atomic store, initialized with the given arguments.

Loading a Store

- load:

Loads the cache nodes for the receiver.

- objectIDForEntity:referenceObject:

Returns a managed object ID from the reference data for a specified entity.

- addCacheNodes:

Registers a set of cache nodes with the receiver.

Updating Cache Nodes

- newCacheNodeForManagedObject:

Returns a new cache node for a given managed object.

- newReferenceObjectForManagedObject:

Returns a new reference object for a given managed object.

- updateCacheNode:fromManagedObject:

Updates the given cache node using the values in a given managed object.

- willRemoveCacheNodes:

Method invoked before the store removes the given collection of cache nodes.

Saving a Store

- save:

Saves the cache nodes.

Utility Methods

- cacheNodes

Returns the set of cache nodes registered with the receiver.

- cacheNodeForObjectID:

Returns the cache node for a given managed object ID.

- referenceObjectForObjectID:

Returns the reference object for a given managed object ID.

Managing Metadata

- metadata

Returns the metadata for the receiver.

- setMetadata:

Sets the metadata for the receiver.

Relationships

Inherits From

See Also

Store Coordination

NSPersistentStoreCoordinator

A coordinator that uses the model to help contexts and persistent stores communicate.

NSPersistentStore

The abstract base class for all Core Data persistent stores.

NSPersistentStoreDescription

A description object used to create and load a persistent store.

NSPersistentStoreRequest

Criteria used to retrieve data from or save data to a persistent store.

NSPersistentStoreResult

The abstract base class for results returned from a persistent store coordinator.

NSPersistentStoreAsynchronousResult

A concrete class used to represent the results of an asynchronous request.

NSSaveChangesRequest

An encapsulation of a collection of changes to be made by an object store in response to a save operation on a managed object context.

NSAtomicStoreCacheNode

A concrete class that you use to represent basic nodes in a Core Data atomic store.

NSIncrementalStore

An abstract superclass defining the API through which Core Data communicates with a store.

NSIncrementalStoreNode

A concrete class used to represent basic nodes in a Core Data incremental store.