Record Class InfinispanStoreConfiguration
java.lang.Object
java.lang.Record
dev.langchain4j.store.embedding.infinispan.InfinispanStoreConfiguration
public record InfinispanStoreConfiguration(String cacheName, Integer dimension, Integer distance, String similarity, String cacheConfig, String packageItem, String fileName, String langchainItemName, String metadataItemName, boolean createCache, boolean registerSchema)
extends Record
Holds configuration for the store
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default Cache Configstatic final int
The default distance to for the searchstatic final String
Default package of the schemastatic final String
Default name of the protobuf langchain item.static final String
Default name of the protobuf metadata item.static final String
Default vector similarity -
Constructor Summary
ConstructorDescriptionInfinispanStoreConfiguration
(String cacheName, Integer dimension, Integer distance, String similarity, String cacheConfig, String packageItem, String fileName, String langchainItemName, String metadataItemName, boolean createCache, boolean registerSchema) Creates the configuration and sets default values -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecacheConfig
record component.Returns the value of thecacheName
record component.boolean
Returns the value of thecreateCache
record component.Returns the value of thedimension
record component.distance()
Returns the value of thedistance
record component.final boolean
Indicates whether some other object is "equal to" this one.fileName()
Returns the value of thefileName
record component.final int
hashCode()
Returns a hash code value for this object.Get the full name of the langchainItem protobuf typeReturns the value of thelangchainItemName
record component.Get the full name of the metadata protobuf typeReturns the value of themetadataItemName
record component.Returns the value of thepackageItem
record component.boolean
Returns the value of theregisterSchema
record component.Returns the value of thesimilarity
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DEFAULT_CACHE_CONFIG
Default Cache Config- See Also:
-
DEFAULT_ITEM_PACKAGE
Default package of the schema- See Also:
-
DEFAULT_LANGCHAIN_ITEM
Default name of the protobuf langchain item. Size will be added- See Also:
-
DEFAULT_METADATA_ITEM
Default name of the protobuf metadata item. Size will be added- See Also:
-
DEFAULT_DISTANCE
public static final int DEFAULT_DISTANCEThe default distance to for the search- See Also:
-
DEFAULT_SIMILARITY
Default vector similarity- See Also:
-
-
Constructor Details
-
InfinispanStoreConfiguration
public InfinispanStoreConfiguration(String cacheName, Integer dimension, Integer distance, String similarity, String cacheConfig, String packageItem, String fileName, String langchainItemName, String metadataItemName, boolean createCache, boolean registerSchema) Creates the configuration and sets default values- Parameters:
cacheName
- , mandatorydimension
- , mandatorydistance
- , defaults to 3similarity
- , defaults COUSINEcacheConfig
- , the full cache configurationpackageItem
- , optional the package itemfileName
- , optional file namelangchainItemName
- , optional item namemetadataItemName
- , optional metadata item namecreateCache
- , defaults to true. Disables creating the cache on startupregisterSchema
- , defaults to true. Disables registering the schema in the server
-
-
Method Details
-
langchainItemFullType
Get the full name of the langchainItem protobuf type- Returns:
- langchainItemFullType
-
metadataFullType
Get the full name of the metadata protobuf type- Returns:
- metadataFullType
-
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 '=='. -
cacheName
Returns the value of thecacheName
record component.- Returns:
- the value of the
cacheName
record component
-
dimension
Returns the value of thedimension
record component.- Returns:
- the value of the
dimension
record component
-
distance
Returns the value of thedistance
record component.- Returns:
- the value of the
distance
record component
-
similarity
Returns the value of thesimilarity
record component.- Returns:
- the value of the
similarity
record component
-
cacheConfig
Returns the value of thecacheConfig
record component.- Returns:
- the value of the
cacheConfig
record component
-
packageItem
Returns the value of thepackageItem
record component.- Returns:
- the value of the
packageItem
record component
-
fileName
Returns the value of thefileName
record component.- Returns:
- the value of the
fileName
record component
-
langchainItemName
Returns the value of thelangchainItemName
record component.- Returns:
- the value of the
langchainItemName
record component
-
metadataItemName
Returns the value of themetadataItemName
record component.- Returns:
- the value of the
metadataItemName
record component
-
createCache
public boolean createCache()Returns the value of thecreateCache
record component.- Returns:
- the value of the
createCache
record component
-
registerSchema
public boolean registerSchema()Returns the value of theregisterSchema
record component.- Returns:
- the value of the
registerSchema
record component
-