-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
cache/src/main/java/me/qwqdev/library/cache/factory/RedisCacheServiceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package me.qwqdev.library.cache.factory; | ||
|
||
import lombok.experimental.UtilityClass; | ||
import me.qwqdev.library.cache.service.redis.RedisCacheService; | ||
import me.qwqdev.library.cache.service.redis.RedisCacheServiceInterface; | ||
import org.redisson.config.Config; | ||
|
||
/** | ||
* Factory class for creating instances of {@link RedisCacheService}. | ||
* | ||
* @author qwq-dev | ||
* @since 2024-12-21 12:27 | ||
*/ | ||
@UtilityClass | ||
public class RedisCacheServiceFactory { | ||
/** | ||
* Creates a new instance of {@link RedisCacheService} with a default {@link RedisCacheService}. | ||
* | ||
* @param <K> the type of the key | ||
* @param <V> the type of the value | ||
* @return a new instance of {@link RedisCacheService} | ||
*/ | ||
public static <K, V> RedisCacheServiceInterface<K, V> create(Config config) { | ||
return new RedisCacheService<>(config); | ||
} | ||
} |