Class ConfigKey
java.lang.Object
com.oracle.coherence.rag.config.ConfigKey
- All Implemented Interfaces:
PortableObject
A composite configuration key used to address configuration entries in a
distributed Coherence
NamedMap.
The key consists of two parts:
- key – a required opaque component that uniquely identifies a
configuration subject. For model configuration, the recommended format is
"{type}:{provider}/{model}"(for example,"chat:OpenAI/gpt-4o-mini","embedding:OpenAI/text-embedding-3-small"). - storeName – an optional context component that, when present,
scopes the configuration to a specific store (for example,
"docs"). Anullstore name indicates a global configuration that applies across all stores.
Equality and hashing include both the opaque key and the optional store name, allowing concurrent global and store-scoped entries for the same subject to coexist without collision.
This class implements Coherence POF PortableObject to enable efficient
serialization and cross-version evolution. The class is intentionally minimal
and immutable by convention once constructed.
- Since:
- 25.09
- Author:
- Aleks Seovic 2025.08.06
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()key()Returns the opaque key component identifying a configuration subject.voidRestore the contents of a user type instance by reading its state using the specified PofReader object.Returns the optional store name that scopes this configuration.toString()voidwriteExternal(PofWriter out) Save the contents of a POF user type instance by writing its state using the specified PofWriter object.
-
Constructor Details
-
ConfigKey
public ConfigKey()No-arg constructor for POF deserialization. -
ConfigKey
-
ConfigKey
-
-
Method Details
-
key
Returns the opaque key component identifying a configuration subject.- Returns:
- the opaque key component; never
nullfor valid instances
-
storeName
Returns the optional store name that scopes this configuration.- Returns:
- the store name, or
nullif this key represents a global configuration
-
equals
-
hashCode
-
toString
-
readExternal
Description copied from interface:PortableObjectRestore the contents of a user type instance by reading its state using the specified PofReader object.- Specified by:
readExternalin interfacePortableObject- Parameters:
in- the PofReader from which to read the object's state- Throws:
IOException- if an I/O error occurs
-
writeExternal
Description copied from interface:PortableObjectSave the contents of a POF user type instance by writing its state using the specified PofWriter object.- Specified by:
writeExternalin interfacePortableObject- Parameters:
out- the PofWriter to which to write the object's state- Throws:
IOException- if an I/O error occurs
-