Class RedissonIdGenerator
java.lang.Object
icu.congee.id.generator.distributed.rid.RedissonIdGenerator
- All Implemented Interfaces:
IdGenerator
-
Constructor Summary
ConstructorsConstructorDescriptionRedissonIdGenerator(org.redisson.api.RedissonClient redisson, String name, long value, long allocationSize) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface icu.congee.id.base.IdGenerator
generate
-
Constructor Details
-
RedissonIdGenerator
public RedissonIdGenerator(org.redisson.api.RedissonClient redisson, @Value("${id.generator.rid.name:IdGenerator:RedissonIdGenerator:current}") String name, @Value("${id.generator.rid.value:0}") long value, @Value("${id.generator.rid.allocationSize:5000}") long allocationSize)
-
-
Method Details
-
init
@PostConstruct public void init() -
generate
- Specified by:
generatein interfaceIdGenerator
-
idType
- Specified by:
idTypein interfaceIdGenerator
-