Package com.codename1.backend.kv


package com.codename1.backend.kv

A key/value store shared by every process of a deployment -- Redis, Valkey or KeyDB, spoken directly over RESP2 with no client library -- and the in-process store that stands in for one when none is configured.

Set cn1.kv.url (or Spring Boot's spring.data.redis.*) and the server's sessions (cn1.session.store=kv), @Cacheable entries, scheduler locks and KeyValueRateLimiter counts all live there, so replicas behind a load balancer agree. KeyValueStores.current() is the store of the calling thread's server, and a KeyValueStore parameter of a bean is given it.

  • Class
    Description
    A key/value store that several server instances can share: the place a cache, the sessions, rate-limit counters, scheduler locks and pub/sub notifications live once an application runs more than one process.
    Receives published messages.
    An active subscription; closing it stops the deliveries.
    Opens the KeyValueStore a configuration names, and finds the one of the calling thread's server.
    The process-local KeyValueStore: what cn1.kv.url=memory: and an unconfigured server get.
    One connection to a Redis server speaking RESP2, the protocol every Redis, Valkey and KeyDB release understands.
    An error reply from a Redis server -- WRONGTYPE, NOSCRIPT, NOAUTH and the like.
    A KeyValueStore on a Redis server -- or Valkey, KeyDB, Dragonfly, any server that speaks RESP2.