Class LangChainItemMarshaller
java.lang.Object
dev.langchain4j.store.embedding.infinispan.LangChainItemMarshaller
- All Implemented Interfaces:
org.infinispan.protostream.BaseMarshaller<LangChainInfinispanItem>
,org.infinispan.protostream.MessageMarshaller<LangChainInfinispanItem>
public class LangChainItemMarshaller
extends Object
implements org.infinispan.protostream.MessageMarshaller<LangChainInfinispanItem>
Marshaller to read and write embeddings to Infinispan
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.infinispan.protostream.MessageMarshaller
org.infinispan.protostream.MessageMarshaller.ProtoStreamReader, org.infinispan.protostream.MessageMarshaller.ProtoStreamWriter
-
Constructor Summary
ConstructorDescriptionLangChainItemMarshaller
(String typeName) Constructor for the LangChainItemMarshaller Marshaller -
Method Summary
Modifier and TypeMethodDescriptionClass
<? extends LangChainInfinispanItem> readFrom
(org.infinispan.protostream.MessageMarshaller.ProtoStreamReader reader) void
writeTo
(org.infinispan.protostream.MessageMarshaller.ProtoStreamWriter writer, LangChainInfinispanItem item)
-
Constructor Details
-
LangChainItemMarshaller
Constructor for the LangChainItemMarshaller Marshaller- Parameters:
typeName
- , the full type of the protobuf entity
-
-
Method Details
-
readFrom
public LangChainInfinispanItem readFrom(org.infinispan.protostream.MessageMarshaller.ProtoStreamReader reader) throws IOException - Specified by:
readFrom
in interfaceorg.infinispan.protostream.MessageMarshaller<LangChainInfinispanItem>
- Throws:
IOException
-
writeTo
public void writeTo(org.infinispan.protostream.MessageMarshaller.ProtoStreamWriter writer, LangChainInfinispanItem item) throws IOException - Specified by:
writeTo
in interfaceorg.infinispan.protostream.MessageMarshaller<LangChainInfinispanItem>
- Throws:
IOException
-
getJavaClass
- Specified by:
getJavaClass
in interfaceorg.infinispan.protostream.BaseMarshaller<LangChainInfinispanItem>
-
getTypeName
- Specified by:
getTypeName
in interfaceorg.infinispan.protostream.BaseMarshaller<LangChainInfinispanItem>
-