Class XorShiftRandomStrategyFactory
java.lang.Object
services.moleculer.service.MoleculerComponent
services.moleculer.strategy.StrategyFactory
services.moleculer.strategy.ArrayBasedStrategyFactory
services.moleculer.strategy.XorShiftRandomStrategyFactory
- All Implemented Interfaces:
MoleculerLifecycle
Factory of XORSHIFT-based pseudorandom invocation strategy. XORShift is the
fastest random invocation strategy.
- See Also:
-
Field Summary
Fields inherited from class ArrayBasedStrategyFactory
preferLocalFields inherited from class MoleculerComponent
broker, logger, name -
Constructor Summary
ConstructorsConstructorDescriptionConstructor that uses local services when available.XorShiftRandomStrategyFactory(boolean preferLocal) Constructor that can be configured to use local services if possible. -
Method Summary
Methods inherited from class ArrayBasedStrategyFactory
isPreferLocal, setPreferLocal
-
Constructor Details
-
XorShiftRandomStrategyFactory
public XorShiftRandomStrategyFactory()Constructor that uses local services when available. -
XorShiftRandomStrategyFactory
public XorShiftRandomStrategyFactory(boolean preferLocal) Constructor that can be configured to use local services if possible.- Parameters:
preferLocal- invoke local actions if possible
-
-
Method Details
-
create
- Specified by:
createin classStrategyFactory
-