Skip to content

Commit 15add50

Browse files
committed
reactify-core docs
1 parent 8b7a14a commit 15add50

File tree

118 files changed

+1987
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+1987
-18
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</distributionManagement>
5050

5151
<properties>
52-
<reactify.version>1.1.4</reactify.version>
52+
<reactify.version>1.1.5</reactify.version>
5353
<java.version>21</java.version>
5454
<micrometer.tracing.version>1.3.1</micrometer.tracing.version>
5555
<micrometer.registry.version>1.13.1</micrometer.registry.version>

reactify/src/main/java/io/hoangtien2k3/reactify/SpringCommonsApplication.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
import org.springframework.context.annotation.ComponentScan;
2525
import org.springframework.context.annotation.ImportResource;
2626

27+
/**
28+
* <p>SpringCommonsApplication class.</p>
29+
*
30+
* @author hoangtien2k3
31+
*/
2732
@SpringBootApplication(
2833
exclude = {
2934
DataSourceAutoConfiguration.class,
@@ -36,6 +41,11 @@
3641
// @EnableDiscoveryClient
3742
public class SpringCommonsApplication {
3843

44+
/**
45+
* <p>main.</p>
46+
*
47+
* @param args an array of {@link java.lang.String} objects
48+
*/
3949
public static void main(String[] args) {
4050
SpringApplication.run(SpringCommonsApplication.class, args);
4151
}

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/LocalCache.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
import java.lang.annotation.Target;
2222

2323
/** @deprecated */
24+
/**
25+
* <p>LocalCache class.</p>
26+
*
27+
* @author hoangtien2k3
28+
*/
2429
@Deprecated
2530
@Target(ElementType.METHOD)
2631
@Retention(RetentionPolicy.RUNTIME)

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/LogPerformance.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
import java.lang.annotation.RetentionPolicy;
2121
import java.lang.annotation.Target;
2222

23+
/**
24+
* <p>LogPerformance class.</p>
25+
*
26+
* @author hoangtien2k3
27+
*/
2328
@Target({ElementType.METHOD, ElementType.TYPE})
2429
@Retention(RetentionPolicy.RUNTIME)
2530
public @interface LogPerformance {

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/Loggable.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
import java.lang.annotation.Target;
2222

2323
/**
24+
* <p>Loggable class.</p>
25+
*
2426
* @author hoangtien2k3
2527
*/
2628
@Retention(RetentionPolicy.RUNTIME)

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/cache/CacheAspect.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
import reactor.core.publisher.Signal;
3131

3232
/** @deprecated */
33+
/**
34+
* <p>CacheAspect class.</p>
35+
*
36+
* @author hoangtien2k3
37+
*/
3338
@Deprecated
3439
@Aspect
3540
@Configuration
@@ -38,6 +43,13 @@ public class CacheAspect {
3843
@Pointcut("@annotation(io.hoangtien2k3.reactify.annotations.LocalCache)")
3944
private void processAnnotation() {}
4045

46+
/**
47+
* <p>aroundAdvice.</p>
48+
*
49+
* @param joinPoint a {@link org.aspectj.lang.ProceedingJoinPoint} object
50+
* @return a {@link java.lang.Object} object
51+
* @throws java.lang.Throwable if any.
52+
*/
4153
@Around("processAnnotation()")
4254
public Object aroundAdvice(ProceedingJoinPoint joinPoint) throws Throwable {
4355
Object[] args = joinPoint.getArgs();

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/cache/CacheStore.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@
3434
import org.springframework.stereotype.Component;
3535

3636
/** @deprecated */
37+
/**
38+
* <p>CacheStore class.</p>
39+
*
40+
* @author hoangtien2k3
41+
*/
3742
@Deprecated
3843
@Slf4j
3944
@Component
@@ -81,10 +86,21 @@ private static void init() {
8186
log.info("Finish initializing {} cache", caches.size());
8287
}
8388

89+
/**
90+
* <p>getCache.</p>
91+
*
92+
* @param key a {@link java.lang.String} object
93+
* @return a {@link com.github.benmanes.caffeine.cache.Cache} object
94+
*/
8495
public static Cache getCache(String key) {
8596
return caches.get(key);
8697
}
8798

99+
/**
100+
* <p>autoLoad.</p>
101+
*
102+
* @param event a {@link org.springframework.context.event.ContextRefreshedEvent} object
103+
*/
88104
@Async
89105
@EventListener
90106
public void autoLoad(ContextRefreshedEvent event) {

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/cache/CacheUtils.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,22 @@
2323
import reactor.core.publisher.Mono;
2424

2525
/** @deprecated */
26+
/**
27+
* <p>CacheUtils class.</p>
28+
*
29+
* @author hoangtien2k3
30+
*/
2631
@Deprecated
2732
@Slf4j
2833
@Component
2934
@RequiredArgsConstructor
3035
public class CacheUtils {
3136

37+
/**
38+
* <p>invokeMethod.</p>
39+
*
40+
* @param method a {@link java.lang.reflect.Method} object
41+
*/
3242
public static void invokeMethod(Method method) {
3343
try {
3444
Class declaringClass = method.getDeclaringClass();

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/cache/CustomizeRemovalListener.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@
2424
import org.checkerframework.checker.nullness.qual.Nullable;
2525

2626
/** @deprecated */
27+
/**
28+
* <p>CustomizeRemovalListener class.</p>
29+
*
30+
* @author hoangtien2k3
31+
*/
2732
@Deprecated
2833
@Slf4j
2934
@AllArgsConstructor
3035
public class CustomizeRemovalListener implements RemovalListener {
3136
private Method method;
3237

38+
/** {@inheritDoc} */
3339
@Override
3440
public void onRemoval(@Nullable Object key, @Nullable Object value, @NonNull RemovalCause removalCause) {
3541
if (removalCause.wasEvicted()) {

reactify/src/main/java/io/hoangtien2k3/reactify/annotations/logging/LoggerAspect.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,20 @@
2222
import org.aspectj.lang.annotation.Pointcut;
2323
import org.springframework.context.annotation.Configuration;
2424

25+
/**
26+
* <p>LoggerAspect class.</p>
27+
*
28+
* @author hoangtien2k3
29+
*/
2530
@Aspect
2631
@Configuration
2732
@RequiredArgsConstructor
2833
public class LoggerAspect {
2934
private final LoggerAspectUtils loggerAspectUtils;
3035

36+
/**
37+
* <p>performancePointCut.</p>
38+
*/
3139
@Pointcut("(execution(* io.hoangtien2k3.reactify.*.controller..*(..)) || "
3240
+ "execution(* io.hoangtien2k3.reactify.*.service..*(..)) || "
3341
+ "execution(* io.hoangtien2k3.reactify.*.repository..*(..)) || "
@@ -38,6 +46,13 @@ public void performancePointCut() {}
3846
@Pointcut("@annotation(io.hoangtien2k3.reactify.annotations.LogPerformance)")
3947
private void logPerfMethods() {}
4048

49+
/**
50+
* <p>logAround.</p>
51+
*
52+
* @param joinPoint a {@link org.aspectj.lang.ProceedingJoinPoint} object
53+
* @return a {@link java.lang.Object} object
54+
* @throws java.lang.Throwable if any.
55+
*/
4156
@Around("performancePointCut() || logPerfMethods()")
4257
public Object logAround(ProceedingJoinPoint joinPoint) throws Throwable {
4358
return loggerAspectUtils.logAround(joinPoint);

0 commit comments

Comments
 (0)