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 aRedisSettings
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclientName
record component.int
database()
Returns the value of thedatabase
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.host()
Returns the value of thehost
record component.password()
Returns the value of thepassword
record component.int
poolSize()
Returns the value of thepoolSize
record component.int
port()
Returns the value of theport
record component.int
timeout()
Returns the value of thetimeout
record component.final String
toString()
Returns a string representation of this record class.user()
Returns the value of theuser
record 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 aRedisSettings
record class.- Parameters:
host
- the value for thehost
record componentport
- the value for theport
record componentuser
- the value for theuser
record componentpassword
- the value for thepassword
record componentdatabase
- the value for thedatabase
record componenttimeout
- the value for thetimeout
record componentclientName
- the value for theclientName
record componentpoolSize
- the value for thepoolSize
record 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 thehost
record component.- Returns:
- the value of the
host
record component
-
port
public int port()Returns the value of theport
record component.- Returns:
- the value of the
port
record component
-
user
Returns the value of theuser
record component.- Returns:
- the value of the
user
record component
-
password
Returns the value of thepassword
record component.- Returns:
- the value of the
password
record component
-
database
public int database()Returns the value of thedatabase
record component.- Returns:
- the value of the
database
record component
-
timeout
public int timeout()Returns the value of thetimeout
record component.- Returns:
- the value of the
timeout
record component
-
clientName
Returns the value of theclientName
record component.- Returns:
- the value of the
clientName
record component
-
poolSize
public int poolSize()Returns the value of thepoolSize
record component.- Returns:
- the value of the
poolSize
record component
-