Skip to content

Commit

Permalink
Merge pull request #44 from malakaganga/improve_con
Browse files Browse the repository at this point in the history
Change connector model of Redis
  • Loading branch information
malakaganga authored Jun 1, 2024
2 parents 186886a + ad26f31 commit efc3b88
Show file tree
Hide file tree
Showing 5 changed files with 308 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<groupId>org.wso2.carbon.connector</groupId>
<artifactId>org.wso2.carbon.connector.redis</artifactId>
<packaging>jar</packaging>
<version>2.7.0</version>
<version>3.0.0</version>
<name>WSO2 Carbon - Mediation Library Connector For Redis</name>
<url>http://wso2.org</url>
<properties>
Expand Down
50 changes: 50 additions & 0 deletions src/main/resources/uischema/get.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"connectorName": "redis",
"operationName": "get",
"title": "Get fields in redis db",
"help": "<h1>Get fields in redis db</h1>",
"elements": [
{
"type": "attributeGroup",
"value": {
"groupName": "General",
"elements": [
{
"type": "attribute",
"value": {
"name": "configRef",
"displayName": "Redis Connection",
"inputType": "connection",
"allowedConnectionTypes": [
"REDIS"
],
"defaultType": "connection.local",
"defaultValue": "",
"required": "true",
"helpTip": "Redis connection to be used"
}
},
{
"type": "attributeGroup",
"value": {
"groupName": "Basic",
"elements": [
{
"type": "attribute",
"value": {
"name": "redisKey",
"displayName": "redisKey",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "Redis Key"
}
}
]
}
}
]
}
}
]
}
72 changes: 72 additions & 0 deletions src/main/resources/uischema/hSet.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"connectorName": "redis",
"operationName": "hSet",
"title": "Set fields in hash tables stored in redis",
"help": "<h1>Set fields in hash tables stored in redis</h1>",
"elements": [
{
"type": "attributeGroup",
"value": {
"groupName": "General",
"elements": [
{
"type": "attribute",
"value": {
"name": "configRef",
"displayName": "Redis Connection",
"inputType": "connection",
"allowedConnectionTypes": [
"REDIS"
],
"defaultType": "connection.local",
"defaultValue": "",
"required": "true",
"helpTip": "File connection to be used"
}
},
{
"type": "attributeGroup",
"value": {
"groupName": "Basic",
"elements": [
{
"type": "attribute",
"value": {
"name": "redisKey",
"displayName": "redisKey",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "Redis Key"
}
},
{
"type": "attribute",
"value": {
"name": "redisField",
"displayName": "redisField",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "false",
"helpTip": "redis Field"
}
},
{
"type": "attribute",
"value": {
"name": "redisValue",
"displayName": "redisValue",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "false",
"helpTip": "Redis Value"
}
}
]
}
}
]
}
}
]
}
124 changes: 124 additions & 0 deletions src/main/resources/uischema/redis.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"connectorName": "redis",
"connectionName": "REDIS",
"title": "REDIS Connection Config",
"help": "<h1>REDIS Connector</h1> <b>The REDIS connector supports REDIS connection</b>",
"elements": [
{
"type": "attribute",
"value": {
"name": "connectionName",
"displayName": "Connection Name",
"inputType": "string",
"defaultValue": "REDIS_CONNECTION_1",
"required": "true",
"helpTip": "The name for the file connection",
"validation": "nameWithoutSpecialCharactors"
}
},
{
"type": "attributeGroup",
"value": {
"groupName": "General",
"elements": [
{
"type": "attributeGroup",
"value": {
"groupName": "Basic",
"elements": [
{
"type": "attribute",
"value": {
"name": "redisHost",
"displayName": "redisHost",
"inputType": "string",
"defaultValue": "",
"required": "true",
"helpTip": "Host name of the redis server"
}
},
{
"type": "attribute",
"value": {
"name": "redisPort",
"displayName": "redisPort",
"inputType": "string",
"defaultValue": "6379",
"required": "true",
"helpTip": "The port number of the redis server"
}
},
{
"type": "attribute",
"value": {
"name": "maxConnections",
"displayName": "maxConnections",
"inputType": "string",
"defaultValue": "",
"required": "false",
"helpTip": " The maximum number of objects (including both idle and active/borrowed) that can exist within the pool at the same time"
}
},
{
"type": "attribute",
"value": {
"name": "maxIdleConnections",
"displayName": "maxIdleConnections",
"inputType": "string",
"defaultValue": "",
"required": "false",
"helpTip": "The maximum number of objects that can remain idle in the pool"
}
},
{
"type": "attribute",
"value": {
"name": "maxWaitTime",
"displayName": "maxWaitTime",
"inputType": "string",
"defaultValue": "",
"required": "false",
"helpTip": "The maximum amount of time that the borrowObject() method should block"
}
},
{
"type": "attribute",
"value": {
"name": "evictionCheckInterval",
"displayName": "evictionCheckInterval",
"inputType": "string",
"defaultValue": "",
"required": "false",
"helpTip": "The time interval between runs of the idle object evictor thread"
}
},
{
"type": "attribute",
"value": {
"name": "minEvictionTime",
"displayName": "minEvictionTime",
"inputType": "string",
"defaultValue": "",
"required": "false",
"helpTip": "The minimum amount of time an object must sit idle in the pool before it is eligible for eviction by the idle object evictor "
}
},
{
"type": "attribute",
"value": {
"name": "exhaustedAction",
"displayName": "exhaustedAction",
"inputType": "string",
"defaultValue": "",
"required": "false",
"helpTip": "Determines the action to take when the borrowObject() method is called, but the pool is exhausted"
}
}
]
}
}
]
}
}
]
}
61 changes: 61 additions & 0 deletions src/main/resources/uischema/set.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"connectorName": "redis",
"operationName": "set",
"title": "Set fields in redis db",
"help": "<h1>Set fields in redis db</h1>",
"elements": [
{
"type": "attributeGroup",
"value": {
"groupName": "General",
"elements": [
{
"type": "attribute",
"value": {
"name": "configRef",
"displayName": "Redis Connection",
"inputType": "connection",
"allowedConnectionTypes": [
"REDIS"
],
"defaultType": "connection.local",
"defaultValue": "",
"required": "true",
"helpTip": "Redis connection to be used"
}
},
{
"type": "attributeGroup",
"value": {
"groupName": "Basic",
"elements": [
{
"type": "attribute",
"value": {
"name": "redisKey",
"displayName": "redisKey",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "true",
"helpTip": "Redis Key"
}
},
{
"type": "attribute",
"value": {
"name": "redisValue",
"displayName": "redisValue",
"inputType": "stringOrExpression",
"defaultValue": "",
"required": "false",
"helpTip": "Redis Value"
}
}
]
}
}
]
}
}
]
}

0 comments on commit efc3b88

Please sign in to comment.