.
This commit is contained in:
parent
54369c08dc
commit
d40d4e6e5d
@ -71,9 +71,9 @@ public class MyRedisCacheSource extends RedisCacheSource {
|
||||
}
|
||||
|
||||
//--------------------- set ------------------------------
|
||||
/*public <T> void sadd(String key, Collection<T> args) {
|
||||
public <T> void sadd(String key, Collection<T> args) {
|
||||
saddAsync(key, args.toArray(Serializable[]::new)).join();
|
||||
}*/
|
||||
}
|
||||
|
||||
public void sadd(String key, Serializable... args) {
|
||||
saddAsync(key, Arrays.stream(args).toArray(Serializable[]::new)).join();
|
||||
|
4
test/net.tccn/cache/RedisTest.java
vendored
4
test/net.tccn/cache/RedisTest.java
vendored
@ -5,7 +5,6 @@ import org.redkale.util.AnyValue;
|
||||
import org.redkale.util.ResourceFactory;
|
||||
import org.redkalex.cache.redis.MyRedisCacheSource;
|
||||
|
||||
import java.awt.*;
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
@ -59,7 +58,8 @@ public class RedisTest {
|
||||
List<Integer> list = List.of(2, 3, 5);
|
||||
// source.sadd("setx", list.toArray(Integer[]::new));
|
||||
source.sadd("setx", list.toArray(Integer[]::new));
|
||||
source.sadd("setx", 12,2312,213);
|
||||
source.sadd("setx", 12, 2312, 213);
|
||||
source.sadd("setx", List.of(1011, 10222));
|
||||
|
||||
source.keys("setx*").forEach(x -> {
|
||||
System.out.println(x);
|
||||
|
Loading…
Reference in New Issue
Block a user