Package me.ahoo.cosid.provider
Class DefaultIdGeneratorProvider
java.lang.Object
me.ahoo.cosid.provider.DefaultIdGeneratorProvider
- All Implemented Interfaces:
IdGeneratorProvider
Default
IdGeneratorProvider
implementation.-
Field Summary
Fields inherited from interface me.ahoo.cosid.provider.IdGeneratorProvider
SHARE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
clear all ID generator.entries()
Get ID generator by name.getAll()
get all ID generator.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.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface me.ahoo.cosid.provider.IdGeneratorProvider
getRequired
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DefaultIdGeneratorProvider
public DefaultIdGeneratorProvider()
-
-
Method Details
-
get
Description copied from interface:IdGeneratorProvider
Get ID generator by name.- Specified by:
get
in interfaceIdGeneratorProvider
- Parameters:
name
- name of ID generator- Returns:
- ID generator
-
remove
Description copied from interface:IdGeneratorProvider
remove ID generator by name.- Specified by:
remove
in interfaceIdGeneratorProvider
- Parameters:
name
- name of ID generator- Returns:
- Previous ID generator
-
set
Description copied from interface:IdGeneratorProvider
Set ID generator by name.- Specified by:
set
in interfaceIdGeneratorProvider
- Parameters:
name
- name of ID generatoridGenerator
- ID generator
-
clear
public void clear()Description copied from interface:IdGeneratorProvider
clear all ID generator.- Specified by:
clear
in interfaceIdGeneratorProvider
-
entries
- Specified by:
entries
in interfaceIdGeneratorProvider
-
getAll
Description copied from interface:IdGeneratorProvider
get all ID generator.- Specified by:
getAll
in interfaceIdGeneratorProvider
- Returns:
- all ID generator