Package io.protostuff.runtime
Class IncrementalIdStrategy.Factory
java.lang.Object
io.protostuff.runtime.IncrementalIdStrategy.Factory
- All Implemented Interfaces:
IdStrategy.Factory
- Enclosing class:
IncrementalIdStrategy
To use
IncrementalIdStrategy
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 -
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates a newIdStrategy
instance (impl).void
Called after the methodIdStrategy.Factory.create()
has been called.
-
Constructor Details
-
Factory
public Factory()
-
-
Method Details
-
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
-