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 useIncrementalIdStrategy
without 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.Registry
to 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 IdStrategy
create()
Creates a newIdStrategy
instance (impl).void
postCreate()
Called after the methodIdStrategy.Factory.create()
has been called.
-
-
-
Method Detail
-
create
public IdStrategy create()
Description copied from interface:IdStrategy.Factory
Creates a newIdStrategy
instance (impl).- Specified by:
create
in interfaceIdStrategy.Factory
-
postCreate
public void postCreate()
Description copied from interface:IdStrategy.Factory
Called after the methodIdStrategy.Factory.create()
has been called. This is used to prevent classloader issues. RuntimeEnv'sRuntimeEnv.ID_STRATEGY
need to be set first.- Specified by:
postCreate
in interfaceIdStrategy.Factory
-
-