-
Notifications
You must be signed in to change notification settings - Fork 5.5k
RRingBuffer.clear() method #6964
Copy link
Copy link
Closed
Description
I used resisson.getRingBuffer("test) to obtain an RRingBuffer, and then used setCapacity(1024) to set the initial capacity. According to the business scenario, sometimes it is necessary to clear all elements in the queue. I attempted to use clear() to clear the elements, but it seems this command also reinitializes the RRingBuffer, causing the following error when using offer() to add elements again: RingBuffer capacity is not defined. Is this by design? If so, what method can be used to only clear the elements without changing the capacity?
Redis version: 6.2.16
Redisson version: 3.52.0
Reactions are currently unavailable