Record Class InMemoryKeyValueStoreFactory
java.lang.Object
java.lang.Record
am.ik.redis.adapter.boot.inmemory.InMemoryKeyValueStoreFactory
- Record Components:
properties- how this backend expires keys nobody touches
- All Implemented Interfaces:
am.ik.redis.adapter.boot.KeyValueStoreFactory
public record InMemoryKeyValueStoreFactory(InMemoryBackendProperties properties)
extends Record
implements am.ik.redis.adapter.boot.KeyValueStoreFactory
The in-memory backend: an independent map per database, in this process.
It is also the worked example of what a backend module contributes — a factory that names itself and hands out one store per database, holding nothing until it is asked to.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aInMemoryKeyValueStoreFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionam.ik.redis.adapter.store.KeyValueStorecreate(int databaseIndex) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.name()Returns the value of thepropertiesrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NAME
The name this backend is known by, in the logs and in the documentation.- See Also:
-
-
Constructor Details
-
InMemoryKeyValueStoreFactory
Creates an instance of aInMemoryKeyValueStoreFactoryrecord class.- Parameters:
properties- the value for thepropertiesrecord component
-
-
Method Details
-
name
- Specified by:
namein interfaceam.ik.redis.adapter.boot.KeyValueStoreFactory
-
create
public am.ik.redis.adapter.store.KeyValueStore create(int databaseIndex) - Specified by:
createin interfaceam.ik.redis.adapter.boot.KeyValueStoreFactory
-
toString
-
hashCode
-
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). -
properties
Returns the value of thepropertiesrecord component.- Returns:
- the value of the
propertiesrecord component
-