Package me.ahoo.cosid.provider
Interface IdGeneratorProvider
- All Known Implementing Classes:
DefaultIdGeneratorProvider
@ThreadSafe
public interface IdGeneratorProvider
IdGenerator
container.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
clear all ID generator.entries()
Get ID generator by name.getAll()
get all ID generator.default IdGenerator
getRequired
(String name) getShare()
Get shared ID generator.remove ID generator by name.Remove shared ID generator.void
set
(String name, IdGenerator idGenerator) Set ID generator by name.void
setShare
(IdGenerator idGenerator) Set shared ID generator.
-
Field Details
-
SHARE
the key of shared ID generator.- See Also:
-
-
Method Details
-
get
Get ID generator by name.- Parameters:
name
- name of ID generator- Returns:
- ID generator
-
getRequired
-
set
Set ID generator by name.- Parameters:
name
- name of ID generatoridGenerator
- ID generator
-
remove
remove ID generator by name.- Parameters:
name
- name of ID generator- Returns:
- Previous ID generator
-
clear
void clear()clear all ID generator. -
entries
Set<Map.Entry<String,IdGenerator>> entries() -
getAll
Collection<IdGenerator> getAll()get all ID generator.- Returns:
- all ID generator