Package dev.agenor.autoconfigure
Record Class AgenorProperties.Directory
java.lang.Object
java.lang.Record
dev.agenor.autoconfigure.AgenorProperties.Directory
- Record Components:
provider- agent directory implementation:local(default),inmemory, orjdbcpresence- presence implementation:inmemory(default) orjdbc. Independent ofprovider, because presence is written far more often than the rest of the directory is and may reasonably live elsewhere (ADR-028)heartbeatInterval- how often the runtime reports its agents alive, for example30s. Absent means no heartbeats are sent at allstalenessWindow- how long an agent may go unseen before its status readsUNKNOWN. Absent means three timesheartbeatInterval, or — when nothing is heartbeating — no expiry at all, which is what the in-memory backend doesjdbc- JDBC-specific configuration; only read whenprovider=jdbc
- Enclosing class:
AgenorProperties
public static record AgenorProperties.Directory(String provider, String presence, Duration heartbeatInterval, Duration stalenessWindow, AgenorProperties.Directory.Jdbc jdbc)
extends Record
Directory
JDBC provider example:
agenor:
directory:
provider: jdbc
presence: jdbc
heartbeat-interval: 30s
jdbc:
url: jdbc:postgresql://localhost:5432/mydb
username: agenor
password: ${DB_PASSWORD}
pool-size: 10
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordJDBC directory configuration. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theheartbeatIntervalrecord component.jdbc()Returns the value of thejdbcrecord component.presence()Returns the value of thepresencerecord component.provider()Returns the value of theproviderrecord component.Returns the value of thestalenessWindowrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Directory
public Directory(@DefaultValue("local") String provider, @DefaultValue("inmemory") String presence, Duration heartbeatInterval, Duration stalenessWindow, AgenorProperties.Directory.Jdbc jdbc) Creates an instance of aDirectoryrecord class.- Parameters:
provider- the value for theproviderrecord componentpresence- the value for thepresencerecord componentheartbeatInterval- the value for theheartbeatIntervalrecord componentstalenessWindow- the value for thestalenessWindowrecord componentjdbc- the value for thejdbcrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
presence
Returns the value of thepresencerecord component.- Returns:
- the value of the
presencerecord component
-
heartbeatInterval
Returns the value of theheartbeatIntervalrecord component.- Returns:
- the value of the
heartbeatIntervalrecord component
-
stalenessWindow
Returns the value of thestalenessWindowrecord component.- Returns:
- the value of the
stalenessWindowrecord component
-
jdbc
Returns the value of thejdbcrecord component.- Returns:
- the value of the
jdbcrecord component
-