Package io.protostuff.runtime
Class IncrementalIdStrategy.Factory
- java.lang.Object
-
- io.protostuff.runtime.IncrementalIdStrategy.Factory
-
- All Implemented Interfaces:
IdStrategy.Factory
- Enclosing class:
- IncrementalIdStrategy
public static class IncrementalIdStrategy.Factory extends java.lang.Object implements IdStrategy.Factory
To useIncrementalIdStrategywithout registering anything, set the system property: "-Dprotostuff.runtime.id_strategy_factory=io.protostuff.runtime.IncrementalIdStrategy$Factory"Note that the pojos will be limited to 63 and the enums to 15.
It is best that you use the
IncrementalIdStrategy.Registryto configure the strategy and set the max limits for each type.
-
-
Constructor Summary
Constructors Constructor Description Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IdStrategycreate()Creates a newIdStrategyinstance (impl).voidpostCreate()Called after the methodIdStrategy.Factory.create()has been called.
-
-
-
Method Detail
-
create
public IdStrategy create()
Description copied from interface:IdStrategy.FactoryCreates a newIdStrategyinstance (impl).- Specified by:
createin interfaceIdStrategy.Factory
-
postCreate
public void postCreate()
Description copied from interface:IdStrategy.FactoryCalled after the methodIdStrategy.Factory.create()has been called. This is used to prevent classloader issues. RuntimeEnv'sRuntimeEnv.ID_STRATEGYneed to be set first.- Specified by:
postCreatein interfaceIdStrategy.Factory
-
-