@Test
public void test1() throws InterruptedException {

    JedisPool jp=new JedisPool("127.0.0.1",6379);
    AccessSpeedLimit accessSpeedLimit=new AccessSpeedLimit(jp);
    SimpleDateFormat sdf=new SimpleDateFormat(" mm:ss");
    while(true){
        //10.0.0.1这个ip每1秒钟最多访问5次if块内代码.
        if(accessSpeedLimit.tryAccess("10.0.0.1", 1,5)){
            System.out.println("yes"+sdf.format(new Date()));
        }else{
            System.out.println("no"+sdf.format(new Date()));
        }
        Thread.sleep(100);
    }
}