Class MachineProperties.Distributor
java.lang.Object
me.ahoo.cosid.spring.boot.starter.machine.MachineProperties.Distributor
- Enclosing class:
- MachineProperties
Configuration for machine ID distribution strategies.
This class configures how machine IDs are allocated and distributed across multiple instances in a distributed system. Different strategies are available for different deployment scenarios.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnumeration of supported machine ID distributor types. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new Distributor configuration with default Redis and Mongo settings. -
Method Summary
Modifier and TypeMethodDescriptionGets the manual configuration.getMongo()Gets the MongoDB configuration.getRedis()Gets the Redis configuration.getType()Gets the distributor type.voidsetManual(MachineProperties.Manual manual) Sets the manual configuration.voidsetMongo(MachineProperties.Mongo mongo) Sets the MongoDB configuration.voidsetRedis(MachineProperties.Redis redis) Sets the Redis configuration.voidSets the distributor type.
-
Field Details
-
TYPE
The configuration property key for distributor type.- See Also:
-
-
Constructor Details
-
Distributor
public Distributor()Constructs a new Distributor configuration with default Redis and Mongo settings.
-
-
Method Details
-
getType
Gets the distributor type.- Returns:
- the distributor type
-
setType
Sets the distributor type.- Parameters:
type- the distributor type to set
-
getManual
Gets the manual configuration.- Returns:
- the manual configuration, or null if not set
-
setManual
Sets the manual configuration.- Parameters:
manual- the manual configuration to set
-
getRedis
Gets the Redis configuration.- Returns:
- the Redis configuration
-
setRedis
Sets the Redis configuration.- Parameters:
redis- the Redis configuration to set
-
getMongo
Gets the MongoDB configuration.- Returns:
- the MongoDB configuration
-
setMongo
Sets the MongoDB configuration.- Parameters:
mongo- the MongoDB configuration to set
-