API Docs - v1.0.10
Store
redis (Store)
This extension assigns data source and connection instructions to event tables. It also implements read write operations on connected datasource. This extension only can be used to read the data which persisted using the same extension since unique implementation has been used to map the relational data in to redis's key and value representation
Syntax
@Store(type="redis", host="<STRING>", port="<LONG>", table.name="<STRING>", password="<STRING>")
@PrimaryKey("PRIMARY_KEY")
@Index("INDEX")
QUERY PARAMETERS
Name | Description | Default Value | Possible Data Types | Optional | Dynamic |
---|---|---|---|---|---|
host | host name of the redis server | STRING | No | No | |
port | port which redis server can be accessed. If this is not specified via the parameter,the default redis port '6379' will be used | 6379 | LONG | Yes | No |
table.name | The name with which the event table should be persisted in the store. If noname is specified via this parameter, the event table is persisted with the same name as the Siddhi table. | The tale name defined in the siddhi app | STRING | Yes | No |
password | password to connect to redis server | will try to connect without authentication | STRING | Yes | No |
Examples EXAMPLE 1
@store(type='redis',host='localhost',port=6379, password='root',table.name='fooTable')define table fooTable(time long, date String)
above collection will create a redis table with the name fooTable