Buckets:

download
raw
3.56 kB
{
"role_mappings": [
{
"role": "Entity",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The callers of rate-limited controller/service methods are outside the repo; no in-repo client targets the RateLimitInterceptor. Only test code (RateLimitTest, ProductController under src/test) exercises it, which does not count."
},
{
"role": "Enforcer",
"status": "present",
"symbol": "invoke",
"file": "smart-cloud-starter/smart-cloud-starter-rate-limit/src/main/java/io/github/smart/cloud/starter/rate/limit/intercept/RateLimitInterceptor.java",
"lines": "42",
"notes": "invoke in RateLimitInterceptor (AOP MethodInterceptor) wraps every @Controller/@RestController/@Service mapping method selected by RateLimitPointCut.matches (pointcut/RateLimitPointCut.java:50,61); it is registered via rateLimitAdvisor in autoconfigure/RateLimitAutoConfiguration.java:68. It derives the limiter key from the method (RateLimitUtil.getSemaphoreBeanName, line 44), throws AccessFrequentlyException when blocked (lines 56/58) and otherwise calls invocation.proceed() (line 62)."
},
{
"role": "Limiter",
"status": "present",
"symbol": "invoke",
"file": "smart-cloud-starter/smart-cloud-starter-rate-limit/src/main/java/io/github/smart/cloud/starter/rate/limit/intercept/RateLimitInterceptor.java",
"lines": "42",
"notes": "Decision is inline in the Enforcer's method invoke (same method as Enforcer): it fetches the per-method Semaphore (line 45) and decides allow/block with JDK Semaphore.tryAcquire() at line 52. Caveat: this is a per-resource concurrency limit (permits = max in-flight requests per method), not a per-entity requests-per-timeframe limit."
},
{
"role": "HistoryProvider",
"status": "present",
"symbol": "get",
"file": "smart-cloud-starter/smart-cloud-starter-rate-limit/src/main/java/io/github/smart/cloud/starter/rate/limit/RateLimitInstanceFactory.java",
"lines": "54",
"notes": "Reached from Limiter invoke at RateLimitInterceptor.java:45; get in RateLimitInstanceFactory returns the java.util.concurrent.Semaphore held in the static RATE_LIMIT_INSTANCES map (line 47), whose remaining permits track the in-flight requests. The update step is tryAcquire (line 52) / release (line 65) in the interceptor; history is not per entity, only per method."
},
{
"role": "PolicyProvider",
"status": "present",
"symbol": "initRateLimitBeans",
"file": "smart-cloud-starter/smart-cloud-starter-rate-limit/src/main/java/io/github/smart/cloud/starter/rate/limit/RateLimitInstanceFactory.java",
"lines": "61",
"notes": "The policy (permits per method key) consumed via get (RateLimitInstanceFactory.java:54, called from RateLimitInterceptor.java:45) is built by initRateLimitBeans (invoked from afterPropertiesSet line 51) from @RateLimiter(permits) annotations (line 69) and the refreshable smart.rate-limit.config map in RateLimitProperties (line 74, bean at RateLimitAutoConfiguration.java:45), materialised as new Semaphore(permits) at line 96."
},
{
"role": "System",
"status": "missing",
"symbol": "",
"file": "",
"lines": "",
"notes": "The repo is a starter/library: the only methods guarded by RateLimitInterceptor are in test code (src/test/.../ProductController.java:33 @RateLimiter). No production module uses @RateLimiter or smart.rate-limit config (rule 6.1.7)."
}
]
}

Xet Storage Details

Size:
3.56 kB
·
Xet hash:
8b7548175da80b4c2c31ae8c0e6c81367d8b721e580a9339614d76305974daf2

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.