TWSMap Class Reference
Inherits from | NSObject |
---|---|
Declared in | TWSMap.h |
– sid
The unique identifier for this map.
- (nonnull NSString *)sid
Return Value
The identifier.
Discussion
The unique identifier for this map.
Declared In
TWSMap.h
– uniqueName
The unique name for this map.
- (nullable NSString *)uniqueName
Return Value
The unique name.
Discussion
The unique name for this map.
Declared In
TWSMap.h
– getItemWithKey:completion:
Request the map item with the specified key.
- (void)getItemWithKey:(nonnull NSString *)key completion:(nonnull TWSMapItemCompletion)completion
Parameters
key |
The key of the item to retrieve. |
---|---|
completion |
Completion block that will specify the result of the operation and the requested item if it exists. |
Discussion
Request the map item with the specified key.
Declared In
TWSMap.h
– setItemWithKey:data:metadata:completion:
Sets the item for the specified key.
- (void)setItemWithKey:(nonnull NSString *)key data:(nonnull TWSData *)data metadata:(nullable TWSMapItemMetadata *)objectMetadata completion:(nullable TWSMapItemCompletion)completion
Parameters
key |
The key of the item to set. |
---|---|
data |
The new data. |
objectMetadata |
Optional metadata for the set item, currently only ttl. |
completion |
Completion block that will specify the result of the operation and the new item. |
Discussion
Sets the item for the specified key.
Declared In
TWSMap.h
– mutateItemWithKey:mutator:metadata:completion:
Modify the MapItem’s data in a conflict-friendly way.
- (void)mutateItemWithKey:(nonnull NSString *)key mutator:(nonnull TWSDataMutator)mutator metadata:(nullable TWSMapItemMetadata *)objectMetadata completion:(nullable TWSMapItemCompletion)completion
Parameters
key |
The key of the item to mutate. |
---|---|
mutator |
The mutator that you provide to modify the data passed in. |
objectMetadata |
Optional metadata for the mutated item, currently only ttl. |
completion |
Completion block that will specify the result of the operation and the updated item. |
Discussion
Modify the MapItem’s data in a conflict-friendly way.
Declared In
TWSMap.h
– removeItemWithKey:completion:
Removes the MapItem with the specified key.
- (void)removeItemWithKey:(nonnull NSString *)key completion:(nullable TWSCompletion)completion
Parameters
key |
The key of the item to remove. |
---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Removes the MapItem with the specified key.
Declared In
TWSMap.h
– queryItemsWithOptions:completion:
Query the map’s items with the requested parameters.
- (void)queryItemsWithOptions:(nonnull TWSMapQueryOptions *)mapQueryOptions completion:(nonnull TWSMapPaginatorCompletion)completion
Parameters
mapQueryOptions |
The options for the map query. |
---|---|
completion |
Completion block that will specify the result of the operation and a paginator for this page of results. |
Discussion
Query the map’s items with the requested parameters.
Declared In
TWSMap.h
– setTtl:completion:
Update the map’s time to live.
- (void)setTtl:(TWSDuration)ttl completion:(nullable TWSCompletion)completion
Parameters
ttl |
The new time to live for this map in seconds from now or TWSDurationInfinity to indicate no expiry. |
---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Update the map’s time to live.
Declared In
TWSMap.h
– setTtl:forItemWithKey:completion:
Update the map item’s time to live.
- (void)setTtl:(TWSDuration)ttl forItemWithKey:(nonnull NSString *)key completion:(nullable TWSCompletion)completion
Parameters
ttl |
The new time to live for this map item in seconds from now or TWSDurationInfinity to indicate no expiry. |
---|---|
key |
The key of the item to adjust the ttl for. |
completion |
Completion block that will specify the result of the operation. |
Discussion
Update the map item’s time to live.
Declared In
TWSMap.h
– removeMapWithCompletion:
Remove the map from the system, deleting it.
- (void)removeMapWithCompletion:(nullable TWSCompletion)completion
Parameters
completion |
Completion block that will specify the result of the operation. |
---|
Discussion
Remove the map from the system, deleting it.
Declared In
TWSMap.h