![]() |
Diffusion Apple API 6.11.5
Unified Client Library for iOS, tvOS and OS X / macOS
|
An update stream builder.
Builder for update stream
to use for updating a specific topic.
The type of the topic being updated must match the update stream type.
To create a new Update Stream Builder, please use newUpdateStreamBuilder
.
- (PTDiffusionBinaryUpdateStream *) binaryUpdateStreamWithPath: | (NSString *) | path |
Creates an update stream to use for updating a specific topic with binary values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
NSInvalidArgumentException | If any argument is `nil`. |
- (PTDiffusionNumberUpdateStream *) doubleFloatNumberUpdateStreamWithPath: | (NSString *) | path |
Creates an update stream to use for updating a specific topic with double-precision floating point (Eight-byte IEEE 754) values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
NSInvalidArgumentException | If any argument is `nil`. |
- (PTDiffusionNumberUpdateStream *) int64NumberUpdateStreamWithPath: | (NSString *) | path |
Creates an update stream to use for updating a specific topic with 64-bit integer values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
NSInvalidArgumentException | If any argument is `nil`. |
- (PTDiffusionJSONUpdateStream *) jsonUpdateStreamWithPath: | (NSString *) | path |
Creates an update stream to use for updating a specific topic with JSON values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
NSInvalidArgumentException | If path is `nil`. |
- (PTDiffusionRecoverableUpdateStream< PTDiffusionBinary * > *) recoverableBinaryUpdateStreamWithPath: | (NSString *) | path | |
retryStrategy: | (PTDiffusionRetryStrategy *) | strategy | |
Creates an update stream to use for updating a specific topic with binary values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
strategy | The retry strategy should the update stream encounter a transient error. |
- (PTDiffusionRecoverableUpdateStream< NSNumber * > *) recoverableDoubleFloatNumberUpdateStreamWithPath: | (NSString *) | path | |
retryStrategy: | (PTDiffusionRetryStrategy *) | strategy | |
Creates an update stream to use for updating a specific topic with double-precision floating point (Eight-byte IEEE 754) values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
strategy | The retry strategy should the update stream encounter a transient error. |
NSInvalidArgumentException | If any argument is `nil`. |
- (PTDiffusionRecoverableUpdateStream< NSNumber * > *) recoverableInt64NumberUpdateStreamWithPath: | (NSString *) | path | |
retryStrategy: | (PTDiffusionRetryStrategy *) | strategy | |
Creates an update stream to use for updating a specific topic with 64-bit integer values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
strategy | The retry strategy should the update stream encounter a transient error. |
NSInvalidArgumentException | If any argument is `nil`. |
- (PTDiffusionRecoverableUpdateStream< PTDiffusionJSON * > *) recoverableJsonUpdateStreamWithPath: | (NSString *) | path | |
retryStrategy: | (PTDiffusionRetryStrategy *) | strategy | |
Creates an update stream to use for updating a specific topic with JSON values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
strategy | The retry strategy should the update stream encounter a transient error. |
NSInvalidArgumentException | If path is `nil`. |
- (PTDiffusionRecoverableUpdateStream< NSString * > *) recoverableStringUpdateStreamWithPath: | (NSString *) | path | |
retryStrategy: | (PTDiffusionRetryStrategy *) | strategy | |
Creates an update stream to use for updating a specific topic with string values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
strategy | The retry strategy should the update stream encounter a transient error. |
NSInvalidArgumentException | If any argument is `nil`. |
- (instancetype) reset |
Resets the builder to its default parameters.
- (PTDiffusionStringUpdateStream *) stringUpdateStreamWithPath: | (NSString *) | path |
Creates an update stream to use for updating a specific topic with string values.
Update streams send a sequence of updates for a specific topic. The updates may be delivered to the server as binary deltas. They do not provide exclusive access to the topic. If exclusive access is required update streams should be used with session locks as constraints.
Streams are validated lazily when the first 'set' or 'validate' operation is completed. Once validated a stream can be invalidated, after which it rejects future updates.
path | The path of the topic. |
NSInvalidArgumentException | If any argument is `nil`. |
- (instancetype) topicSpecification: | (PTDiffusionTopicSpecification *const _Nullable) | specification |
Specifies a topic specification
for this update stream.
If a topic does not exist at the path
, one will be created using the topic specification, otherwise the operation will fail.
Specification is nil
by default. Calling this method with a nil
parameter removes the currently set topic specification from this builder.
specification | the required specification for the topic |
- (instancetype) updateConstraint: | (PTDiffusionUpdateConstraint *const _Nullable) | constraint |
Constraints can be applied to the setting of a value and creation of an update stream. Constraints describe a condition that must be satisfied for the operation to succeed. The constraints are evaluated on the server. The available constraints are:
Constraint is nil
by default. Calling this method with a nil
parameter removes the currently set update constraint from this builder.
constraint | the constraint that must be satisfied for the update stream to be validated |