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:
Overview
Properties
Methods
Signals
Enumerations
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:
- › Signal:
errorChanged()
- › Attributes:
Readonly
errorString
This property holds the current human readable error string corresponding to the current value in the error property. It may include additional information such as failure reasons or locations.
- › Type:
String
- › Signal:
errorStringChanged()
- › Attributes:
Readonly
storage
This property holds the Storage where the database is stored.
- › Type:
- › Signal:
storageChanged()
- › Attributes:
Writable, Optional
Methods
clear()
This method removes all stored Event objects.
datasetCount()
This method is a getter of the number of currently stored Event objects.
- › Returns:
SignedInteger
Signals
errorOccurred()
This signal is emitted whenever an error has occurred, regardless of whether the error property has changed or not. In contrast to the change notification signal of the error property this signal is also emitted several times if a certain error occurs several times in succession.
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 |
|---|---|---|
|
|
No error occurred or was detected. |
|
|
Parent not set, or parent is no CloudOfThingsEventWriter. |
|
|
CloudOfThingsEventWriter has empty or invalid object id. |
Example
See CloudOfThingsEventWriter example on how to use CloudOfThingsEventDatabase.