Package de.murmelmeister.murmelapi.redis
Record Class RedisConfig
java.lang.Object
java.lang.Record
de.murmelmeister.murmelapi.redis.RedisConfig
public record RedisConfig(boolean enabled, String host, int port, String username, String password, boolean ssl, String channel, String serverId, RedisConfig.TlsSettings tls)
extends Record
Shared configuration, stored in each plugin's data directory.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPEM files or Java stores; an empty trust configuration uses the JVM's trusted CAs. -
Constructor Summary
ConstructorsConstructorDescriptionRedisConfig(boolean enabled, String host, int port, String username, String password, boolean ssl, String channel, String serverId) RedisConfig(boolean enabled, String host, int port, String username, String password, boolean ssl, String channel, String serverId, RedisConfig.TlsSettings tls) Creates an instance of aRedisConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchannel()Returns the value of thechannelrecord component.booleanenabled()Returns the value of theenabledrecord 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.static RedisConfigpassword()Returns the value of thepasswordrecord component.intport()Returns the value of theportrecord component.serverId()Returns the value of theserverIdrecord component.booleanssl()Returns the value of thesslrecord component.io.lettuce.core.SslOptionstls()Returns the value of thetlsrecord component.@NonNull StringtoString()Returns a string representation of this record class.io.lettuce.core.RedisURIuri()username()Returns the value of theusernamerecord component.
-
Constructor Details
-
RedisConfig
-
RedisConfig
public RedisConfig(boolean enabled, String host, int port, String username, String password, boolean ssl, String channel, String serverId, RedisConfig.TlsSettings tls) Creates an instance of aRedisConfigrecord class.- Parameters:
enabled- the value for theenabledrecord componenthost- the value for thehostrecord componentport- the value for theportrecord componentusername- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentssl- the value for thesslrecord componentchannel- the value for thechannelrecord componentserverId- the value for theserverIdrecord componenttls- the value for thetlsrecord component
-
-
Method Details
-
load
-
uri
public io.lettuce.core.RedisURI uri() -
sslOptions
public io.lettuce.core.SslOptions sslOptions() -
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 '=='. -
enabled
public boolean enabled()Returns the value of theenabledrecord component.- Returns:
- the value of the
enabledrecord component
-
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
-
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
ssl
public boolean ssl()Returns the value of thesslrecord component.- Returns:
- the value of the
sslrecord component
-
channel
Returns the value of thechannelrecord component.- Returns:
- the value of the
channelrecord component
-
serverId
Returns the value of theserverIdrecord component.- Returns:
- the value of the
serverIdrecord component
-
tls
Returns the value of thetlsrecord component.- Returns:
- the value of the
tlsrecord component
-