Record Class CommandHandlingCacheProperties
java.lang.Object
java.lang.Record
com.opencqrs.framework.command.cache.CommandHandlingCacheProperties
- Record Components:
type- The cache type to use, unless "ref" is specified.capacity- The cache capacity, if "in_memory" is used.ref- Custom cache to use.
@ConfigurationProperties("opencqrs.command-handling.cache")
public record CommandHandlingCacheProperties(CommandHandlingCacheProperties.Type type, Integer capacity, String ref)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe pre-defined cache type. -
Constructor Summary
ConstructorsConstructorDescriptionCommandHandlingCacheProperties(CommandHandlingCacheProperties.Type type, Integer capacity, String ref) Creates an instance of aCommandHandlingCachePropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncapacity()Returns the value of thecapacityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.ref()Returns the value of therefrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
CommandHandlingCacheProperties
public CommandHandlingCacheProperties(@DefaultValue("none") CommandHandlingCacheProperties.Type type, @DefaultValue("1000") Integer capacity, String ref) Creates an instance of aCommandHandlingCachePropertiesrecord class.
-
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
capacity
Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
ref
Returns the value of therefrecord component.- Returns:
- the value of the
refrecord component
-