Package dev.unnm3d.redischat.settings
Record Class Config.RedisSettings
java.lang.Object
java.lang.Record
dev.unnm3d.redischat.settings.Config.RedisSettings
- Enclosing class:
Config
-
Constructor Summary
ConstructorsConstructorDescriptionRedisSettings(String host, int port, String user, String password, int database, int timeout, String clientName, int poolSize) Creates an instance of aRedisSettingsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientNamerecord component.intdatabase()Returns the value of thedatabaserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.host()Returns the value of thehostrecord component.password()Returns the value of thepasswordrecord component.intpoolSize()Returns the value of thepoolSizerecord component.intport()Returns the value of theportrecord component.inttimeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.user()Returns the value of theuserrecord component.
-
Constructor Details
-
RedisSettings
public RedisSettings(String host, int port, String user, String password, int database, int timeout, String clientName, int poolSize) Creates an instance of aRedisSettingsrecord class.- Parameters:
host- the value for thehostrecord componentport- the value for theportrecord componentuser- the value for theuserrecord componentpassword- the value for thepasswordrecord componentdatabase- the value for thedatabaserecord componenttimeout- the value for thetimeoutrecord componentclientName- the value for theclientNamerecord componentpoolSize- the value for thepoolSizerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
host
Returns the value of thehostrecord component.- Returns:
- the value of the
hostrecord component
-
port
public int port()Returns the value of theportrecord component.- Returns:
- the value of the
portrecord component
-
user
Returns the value of theuserrecord component.- Returns:
- the value of the
userrecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
database
public int database()Returns the value of thedatabaserecord component.- Returns:
- the value of the
databaserecord component
-
timeout
public int timeout()Returns the value of thetimeoutrecord component.- Returns:
- the value of the
timeoutrecord component
-
clientName
Returns the value of theclientNamerecord component.- Returns:
- the value of the
clientNamerecord component
-
poolSize
public int poolSize()Returns the value of thepoolSizerecord component.- Returns:
- the value of the
poolSizerecord component
-