Demo entry 6659419

java

   

Submitted by Lemon on Nov 11, 2017 at 06:08
Language: Java. Code size: 164 Bytes.

if(accessLimitService.tryAcquire()){
            //获取到令牌则正常业务执行
            ……
        }else{
            //获取不到令牌则返回系统繁忙
            return "系统繁忙";
        }

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).