GPKGUserRowSync
Objective-C
@interface GPKGUserRowSync : NSObject
Swift
class GPKGUserRowSync : NSObject
User Row Sync to support sharing a single user row read copy when multiple near simultaneous asynchronous requests are made
-
Initialize
Declaration
Objective-C
- (instancetype)init;Swift
init!()Return Value
new user row sync
-
Get the row if another same id request has been made by waiting until the row has been set. If no current request, lock the for the calling thread which should read the row and call “setRow: (GPKGUserRow *) row withId: (int) id” when complete.
Declaration
Objective-C
- (GPKGUserRow *)rowOrLockId:(int)id;Swift
func rowOrLockId(_ id: Int32) -> GPKGUserRow!Parameters
iduser row id
Return Value
row if retrieved from a previous request, null if calling thread should read row and set using “setRow: (GPKGUserRow *) row withId: (int) id”
-
Get the row if another same id number request has been made by waiting until the row has been set. If no current request, lock the for the calling thread which should read the row and call “setRow: (GPKGUserRow *) row withNumber: (NSNumber *) id” when complete.
Declaration
Objective-C
- (GPKGUserRow *)rowOrLockNumber:(NSNumber *)id;Swift
func rowOrLock(_ id: NSNumber!) -> GPKGUserRow!Parameters
iduser row id
Return Value
row if retrieved from a previous request, null if calling thread should read row and set using “setRow: (GPKGUserRow *) row withNumber: (NSNumber *) id”
-
Set the row, row id, and notify all waiting threads to retrieve the row.
Declaration
Objective-C
- (void)setRow:(GPKGUserRow *)row withId:(int)id;Swift
func setRow(_ row: GPKGUserRow!, withId id: Int32)Parameters
rowuser row or null
iduser row id
-
Set the row, row id number, and notify all waiting threads to retrieve the row.
Declaration
Objective-C
- (void)setRow:(GPKGUserRow *)row withNumber:(NSNumber *)id;Swift
func setRow(_ row: GPKGUserRow!, with id: NSNumber!)Parameters
rowuser row or null
iduser row number id
View on GitHub
GPKGUserRowSync Class Reference