Skip to content

Commit f8b76c0

Browse files
committed
BitmapTest
1 parent b0b08e1 commit f8b76c0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package org.cp.javaredis;
2+
3+
import org.junit.jupiter.api.Test;
4+
import org.redisson.api.RBitSet;
5+
import org.redisson.api.RedissonClient;
6+
import org.springframework.beans.factory.annotation.Autowired;
7+
import org.springframework.boot.test.context.SpringBootTest;
8+
9+
@SpringBootTest
10+
public class BitmapTest {
11+
12+
@Autowired
13+
RedissonClient redissonClient;
14+
15+
@Test
16+
public void test() {
17+
RBitSet bitset = redissonClient.getBitSet("bitset");
18+
bitset.set(0, true);
19+
System.out.println(bitset.get(0));
20+
System.out.println(bitset.get(1));
21+
System.out.println(bitset.incrementAndGetInteger(0, 1));
22+
}
23+
24+
}

0 commit comments

Comments
 (0)