Protocols
The following protocols are available globally.
-
A homogenous collection of
See moreRLMObjectinstances. Examples of conforming types includeRLMArray,RLMResults, andRLMLinkingObjects.Declaration
Objective-C
@protocol RLMCollection <NSFastEnumeration, RLMThreadConfined>Swift
protocol RLMCollection : NSFastEnumeration, RLMThreadConfined
-
Objects of types which conform to
RLMThreadConfinedcan be managed by a Realm, which will make them bound to a thread-specificRLMRealminstance. Managed objects must be explicitly exported and imported to be passed between threads.Managed instances of objects conforming to this protocol can be converted to a thread-safe reference for transport between threads by passing to the
+[RLMThreadSafeReference referenceWithThreadConfined:]constructor.Note that only types defined by Realm can meaningfully conform to this protocol, and defining new classes which attempt to conform to it will not make them work with
See moreRLMThreadSafeReference.Declaration
Objective-C
@protocol RLMThreadConfined <NSObject>Swift
protocol RLMThreadConfined : NSObjectProtocol
View on GitHub
Install in Dash
Protocols Reference