It base on RepeatCheck interface in Gear Projection.
@Autowired private RedisConnectionFactory connectFactory; @Test public void testRepeatCheck() throws InterruptedException { RedisRepeatCheck repeatCheck = new RedisRepeatCheck(connectFactory); boolean isRepeat = repeatCheck.isRepeat("GearEE-Redis:RepeatCheck:testRepeatCheck" , ExpireMode.MILISECONDS , 200); Assert.assertFalse(isRepeat); isRepeat = repeatCheck.isRepeat("GearEE-Redis:RepeatCheck:testRepeatCheck"); Assert.assertTrue(isRepeat); TimeUnit.SECONDS.sleep(1); }
There was an error while loading. Please reload this page.