Package io.hekate.cluster.seed.etcd
Class EtcdSeedNodeProviderConfig
- java.lang.Object
-
- io.hekate.cluster.seed.etcd.EtcdSeedNodeProviderConfig
-
public class EtcdSeedNodeProviderConfig extends Object
Configuration forEtcdSeedNodeProvider
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_BASE_PATH
Default value (="/hekate/cluster") forsetBasePath(String)
.static int
DEFAULT_CLEANUP_INTERVAL
Default value (=60000) forsetCleanupInterval(int)
.
-
Constructor Summary
Constructors Constructor Description EtcdSeedNodeProviderConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getBasePath()
Returns the base path to store seed nodes information in Etcd (seesetBasePath(String)
).int
getCleanupInterval()
Returns the time interval in milliseconds between stale node cleanup runs (seesetCleanupInterval(int)
).List<String>
getEndpoints()
Returns the list of Etcd endpoint addresses (seesetEndpoints(List)
).String
getPassword()
Returns the Etcd password (seesetPassword(String)
).String
getUsername()
Returns the Etcd username (seesetUsername(String)
).void
setBasePath(String basePath)
Sets the base path to store seed nodes information in Etcd.void
setCleanupInterval(int cleanupInterval)
Sets the time interval in milliseconds between stale node cleanup runs.void
setEndpoints(List<String> endpoints)
Sets the list of Etcd endpoint addresses.void
setPassword(String password)
Sets the Etcd password.void
setUsername(String username)
Sets the Etcd username.String
toString()
EtcdSeedNodeProviderConfig
withBasePath(String basePath)
Fluent-style version ofsetBasePath(String)
.EtcdSeedNodeProviderConfig
withCleanupInterval(int cleanupInterval)
Fluent-style version ofsetCleanupInterval(int)
.EtcdSeedNodeProviderConfig
withEndpoint(String endpoint)
Fluent-style version ofsetEndpoints(List)
.EtcdSeedNodeProviderConfig
withEndpoints(List<String> endpoints)
Fluent-style version ofsetEndpoints(List)
.EtcdSeedNodeProviderConfig
withPassword(String password)
Fluent-style version ofsetPassword(String)
.EtcdSeedNodeProviderConfig
withUsername(String username)
Fluent-style version ofsetUsername(String)
.
-
-
-
Field Detail
-
DEFAULT_CLEANUP_INTERVAL
public static final int DEFAULT_CLEANUP_INTERVAL
Default value (=60000) forsetCleanupInterval(int)
.- See Also:
- Constant Field Values
-
DEFAULT_BASE_PATH
public static final String DEFAULT_BASE_PATH
Default value (="/hekate/cluster") forsetBasePath(String)
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getEndpoints
public List<String> getEndpoints()
Returns the list of Etcd endpoint addresses (seesetEndpoints(List)
).- Returns:
- List of Etcd endpoints.
-
setEndpoints
public void setEndpoints(List<String> endpoints)
Sets the list of Etcd endpoint addresses. Each address must be a valid string representation ofURI
.This parameter is mandatory and requires at least one Etcd endpoint address to be specified.
- Parameters:
endpoints
- Etcd endpoints.
-
withEndpoints
public EtcdSeedNodeProviderConfig withEndpoints(List<String> endpoints)
Fluent-style version ofsetEndpoints(List)
.- Parameters:
endpoints
- Etcd endpoints.- Returns:
- This instance.
-
withEndpoint
public EtcdSeedNodeProviderConfig withEndpoint(String endpoint)
Fluent-style version ofsetEndpoints(List)
.- Parameters:
endpoint
- Etcd endpoint.- Returns:
- This instance.
-
getUsername
public String getUsername()
Returns the Etcd username (seesetUsername(String)
).- Returns:
- Etcd username.
-
setUsername
public void setUsername(String username)
Sets the Etcd username.This parameter is optional if Etcd doesn't require authorization.
- Parameters:
username
- Etcd username.
-
withUsername
public EtcdSeedNodeProviderConfig withUsername(String username)
Fluent-style version ofsetUsername(String)
.- Parameters:
username
- Etcd username.- Returns:
- This instance.
-
getPassword
public String getPassword()
Returns the Etcd password (seesetPassword(String)
).- Returns:
- Etcd password.
-
setPassword
public void setPassword(String password)
Sets the Etcd password.This parameter is optional if Etcd doesn't require authorization.
- Parameters:
password
- Etcd password.
-
withPassword
public EtcdSeedNodeProviderConfig withPassword(String password)
Fluent-style version ofsetPassword(String)
.- Parameters:
password
- Etcd password.- Returns:
- This instance.
-
getBasePath
public String getBasePath()
Returns the base path to store seed nodes information in Etcd (seesetBasePath(String)
).- Returns:
- Base path to store seed nodes.
-
setBasePath
public void setBasePath(String basePath)
Sets the base path to store seed nodes information in Etcd.Default value of this parameter is "/hekate/cluster".
- Parameters:
basePath
- Base path to store seed nodes.
-
withBasePath
public EtcdSeedNodeProviderConfig withBasePath(String basePath)
Fluent-style version ofsetBasePath(String)
.- Parameters:
basePath
- Base path to store seed nodes.- Returns:
- This instance.
-
getCleanupInterval
public int getCleanupInterval()
Returns the time interval in milliseconds between stale node cleanup runs (seesetCleanupInterval(int)
).- Returns:
- Time interval in milliseconds.
-
setCleanupInterval
public void setCleanupInterval(int cleanupInterval)
Sets the time interval in milliseconds between stale node cleanup runs.Default value of this parameter is 60000.
For more details please see the documentation of
SeedNodeProvider
.- Parameters:
cleanupInterval
- Time interval in milliseconds.- See Also:
SeedNodeProvider.cleanupInterval()
-
withCleanupInterval
public EtcdSeedNodeProviderConfig withCleanupInterval(int cleanupInterval)
Fluent-style version ofsetCleanupInterval(int)
.- Parameters:
cleanupInterval
- Time interval in milliseconds.- Returns:
- This instance.
-
-