redisson / redisson

Redisson - Easy Redis Java client and Real-Time Data Platform. Valkey compatible. Sync/Async/RxJava/Reactive API. Over 50 Redis or Valkey based Java objects and services: Set, Multimap, SortedSet, Map, List, Queue, Deque, Semaphore, Lock, AtomicLong, Map Reduce, Bloom filter, Spring, Tomcat, Scheduler, JCache API, Hibernate, RPC, local cache...
https://redisson.pro
Apache License 2.0
23.31k stars 5.35k forks source link

java.util.LinkedHashSet support #661

Open slavarosin opened 8 years ago

slavarosin commented 8 years ago

Hello!

Will it be a big effort to support java.util.LinkedHashSet-like behavior in one of redisson data structures?

Basically what I need is a collection with element uniqueness and preserved insertion order.

Would be happy to contribute as well, but I would need some guidance or example where to start from.

slavarosin commented 8 years ago

@mrniko I'm on it already, but what is the proper way to get RSet out of RedissonMap (or Map)? Would like to keep RSet on an interface level of RedissonClient.

Currently I have something like this:

RSet<V> set = new RedissonSet<V>(commandExecutor, name);
set.addAll(new RedissonMap<V, Boolean>(commandExecutor, name).keySet());
return set;