CloudOfThingsEventDatabase¶
Description¶
The CloudOfThingsEventDatabase object is used in CloudOfThingsEventWriter to buffer Event objects if the CloudOfThingsClient is not connected. It is designed to work with Cloud of Things only and has additional properties to limit memory usage.
› Inherits: | Object |
---|
Properties¶
bufferSize¶
This property holds how many Event objects can be stored. If this limit is reached the oldest events will be removed. Set to 0
will disable buffering.
› Type: | SignedInteger |
---|---|
› Default: | 100000 |
› Signal: | bufferSizeChanged() |
› Attributes: | Writable |
error¶
This property holds the most recently occurred error or CloudOfThingsEventDatabase.NoError if no error occurred. If the same error occurs multiple times this property does not change. Use the errorOccurred() signal to detect multiple occurrences of the same error.
› Type: | Error |
---|---|
› Signal: | errorChanged() |
› Attributes: | Readonly |
Methods¶
Signals¶
Enumerations¶
Error¶
This enumeration describes all errors which can occur in CloudOfThingsEventDatabase objects. The most recently occurred error is stored in the error property.
Name | Value | Description |
---|---|---|
CloudOfThingsEventDatabase.NoError |
0 |
No error occurred or was detected. |
CloudOfThingsEventDatabase.InvalidParentError |
1 |
Parent not set, or parent is no CloudOfThingsEventWriter. |
CloudOfThingsEventDatabase.InvalidIdError |
2 |
CloudOfThingsEventWriter has empty or invalid object id. |
Example¶
See CloudOfThingsEventWriter example on how to use CloudOfThingsEventDatabase.