Bu sayfa henüz yerel dilinizde mevcut değildir. Daha fazla dil seçeneği eklemek için yoğun bir şekilde çalışıyoruz. Desteğiniz için teşekkür ederiz.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

JedisConfig

Updated on 2023-10-10 GMT+08:00

Path

com.roma.apic.livedata.config.v1.JedisConfig

Description

This class is used together with RedisClient to configure the Redis connection.

Example

importClass(com.roma.apic.livedata.client.v1.RedisClient);
importClass(com.roma.apic.livedata.config.v1.JedisConfig);
function execute(data) {
    var config = new JedisConfig();
    config.setIp(["1.1.1.1"]);
    config.setPort(["6379"]);
    config.setMode("SINGLE");
    var redisClient = new RedisClient(config);
    var count = redisClient.get("visit_count")
    if (!count)
    {
        redisClient.put("visit_count", 1);
    }else {
        redisClient.put("visit_count", parseInt(count) + 1);
    }
    return redisClient.get("visit_count");
}

Constructor Details

public JedisConfig()

Constructs a JedisConfig without parameters.

Method List

Returned Type

Method and Description

int

getDatabase()

Obtain the Jedis database. The default value is 0.

String[]

getIp()

Obtain the IP address list of the Redis.

String

getMaster()

Obtain the master name of the Jedis. This parameter is valid when mode is set to MASTER_SLAVE.

int

getMaxAttempts()

Obtain the number of retry times of the Jedis. The default value is 10000.

int

getMaxIdel()

Obtain the maximum number of idle connections in the Jedis connection pool. The default value is 5.

int

getMaxWait()

Obtain the upper limit of the waiting time (in seconds) when the Jedis connection pool is exhausted. The default value is 60.

String

getMode()

Obtain the Jedis type. The value can be SINGLE, CLUSTER, or MASTER_SLAVE.

String

getPassPhrase()

Obtain the password of the Jedis.

String[]

getPort()

Obtain all port numbers.

int

getSoTimeout()

Obtain the read timeout interval of the Jedis. The default value is 600.

int

getTimeout()

Obtain the timeout interval of the Jedis. The default value is 1000.

void

setDatabase(int database)

Set the database of the Jedis.

void

setIp(String[] ip)

Set the IP address.

void

setMaster(String master)

Set the master name of the Jedis. This parameter is valid when mode is set to MASTER_SLAVE.

void

setMaxAttempts(int maxAttempts)

Set the number of retries of the Jedis. The default value is 10000.

void

setMaxIdel(int maxIdel)

Set the maximum number of idle connections in the Jedis connection pool. The default value is 5.

void

setMaxWait(int maxWait)

Set the upper limit of the waiting time when the Jedis connection pool is exhausted. The default value is 60.

void

setMode(String mode)

Set the Jedis type. The value can be SINGLE, CLUSTER, or MASTER_SLAVE.

void

setPassPhrase(String passPhrase)

Set the password of the Jedis.

void

setPort(String[] port)

Set the port number.

void

setSoTimeout(int soTimeout)

Set the read timeout interval of the Jedis.

void

setTimeout(int timeout)

Set the timeout interval of the Jedis.

Method Details

  • public int getDatabase()

    Obtain the Redis database. The default value is 0.

    Returns

    Database.

  • public String[] getIp()

    Obtain all IP addresses.

    Returns

    String array of IP addresses.

  • public String getMaster()

    Obtain the master name of the Redis. This parameter is valid when mode is set to MASTER_SLAVE.

    Returns

    Master name.

  • public int getMaxAttempts()

    Obtain the number of retry times of the Redis. The default value is 10000.

    Returns

    Number of retry times.

  • public int getMaxIdel()

    Obtain the maximum number of idle connections in the Jedis connection pool. The default value is 5.

    Returns

    Maximum number of idle connections in the connection pool.

  • public int getMaxWait()

    Obtain the upper limit of the waiting time (in seconds) when the Jedis connection pool is exhausted. The default value is 60.

    Returns

    Upper limit of the waiting time when the connection pool is exhausted.

  • public String getMode()

    Obtain the Redis type. The value can be SINGLE, CLUSTER, or MASTER_SLAVE.

    Returns

    Redis type.

  • public String getPassPhrase()

    Obtain the password of the Redis.

    Returns

    Redis password.

  • public String[] getPort()

    Obtain all port numbers.

    Returns

    String array of port numbers.

  • public int getSoTimeout()

    Obtain the read timeout interval (in seconds) of the Jedis. The default value is 600.

    Returns

    Value of soTimeout.

  • public int getTimeout()

    Obtain the timeout interval (in seconds) of the Jedis. The default value is 1000.

    Returns

    Timeout interval.

  • public void setDatabase(int database)

    Set the database of the Redis.

    Input Parameter

    database indicates a database.

  • public void setIp(String[] ip)

    Set the IP address.

    Input Parameter

    ip indicates an IP address.

  • public void setMaster(String master)

    Set the master name of the Redis. This parameter is valid when mode is set to MASTER_SLAVE.

    Input Parameter

    master indicates the master name of the Redis.

  • public void setMaxAttempts(int maxAttempts)

    Set the number of retries of the Jedis.

    Input Parameter

    maxAttempts indicates the number of retries.

  • public void setMaxIdel(int maxIdel)

    Set the maximum number of idle connections in the Jedis connection pool. The default value is 5.

    Input Parameter

    maxIdel indicates the maximum number of idle connections in the connection pool.

  • public void setMaxWait(int maxWait)

    Set the upper limit of the waiting time (in seconds) when the Jedis connection pool is exhausted. The default value is 60.

    Input Parameter

    maxWait indicates the upper limit of the waiting time when the connection pool is exhausted.

  • public void setMode(String mode)

    Set the Redis type. The value can be SINGLE, CLUSTER, or MASTER_SLAVE.

    Input Parameter

    mode indicates the type.

  • public void setPassPhrase(String passPhrase)

    Set the password of the Redis.

    Input Parameter

    passPhrase indicates the password.

  • public void setPort(String[] port)

    Set the port number.

    Input Parameter

    port indicates the port number.

  • public void setSoTimeout(int soTimeout)

    Set the read timeout interval (in seconds) of the Jedis. The default value is 600.

    Input Parameter

    soTimeout indicates the read timeout interval.

  • public void setTimeout(int timeout)

    Set the timeout interval of the Jedis.

    Input Parameter

    timeout indicates the timeout duration, in seconds.

Sitemizi ve deneyiminizi iyileştirmek için çerezleri kullanırız. Sitemizde tarama yapmaya devam ederek çerez politikamızı kabul etmiş olursunuz. Daha fazla bilgi edinin

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback