Package com.hazelcast.vector.jet
Class VectorSinks
java.lang.Object
com.hazelcast.vector.jet.VectorSinks
Factory methods for Vector collection sinks
- Since:
- 5.5
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T,K, V> Sink<T> vectorCollection(VectorCollection<K, V> collection, FunctionEx<? super T, ? extends K> toKeyFn, FunctionEx<? super T, ? extends V> toValueFn, FunctionEx<? super T, VectorValues> toVectorsFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.static <T,K, V> Sink<T> vectorCollection(VectorCollection<K, V> collection, FunctionEx<? super T, ? extends K> toKeyFn, FunctionEx<? super T, VectorDocument<? extends V>> toDocumentFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.static <T,K, V> Sink<T> vectorCollection(String collectionName, FunctionEx<? super T, ? extends K> toKeyFn, FunctionEx<? super T, ? extends V> toValueFn, FunctionEx<? super T, VectorValues> toVectorsFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.static <T,K, V> Sink<T> vectorCollection(String collectionName, FunctionEx<? super T, ? extends K> toKeyFn, FunctionEx<? super T, VectorDocument<? extends V>> toDocumentFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.
-
Method Details
-
vectorCollection
@Nonnull public static <T,K, Sink<T> vectorCollectionV> (@Nonnull VectorCollection<K, V> collection, @Nonnull FunctionEx<? super T, ? extends K> toKeyFn, @Nonnull FunctionEx<? super T, ? extends V> toValueFn, @Nonnull FunctionEx<? super T, VectorValues> toVectorsFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.This sink internally limits number of parallel requests to not overload the members.
- Type Parameters:
T- type of stream itemK- type of vector collection keyV- type of vector collection value- Parameters:
collection- vector collectiontoKeyFn- function that extracts the key from the stream itemtoValueFn- function that extracts the value from the stream itemtoVectorsFn- function that extracts the vectors from the stream item
-
vectorCollection
@Nonnull public static <T,K, Sink<T> vectorCollectionV> (@Nonnull VectorCollection<K, V> collection, @Nonnull FunctionEx<? super T, ? extends K> toKeyFn, @Nonnull FunctionEx<? super T, VectorDocument<? extends V>> toDocumentFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.This sink internally limits number of parallel requests to not overload the members.
- Type Parameters:
T- type of stream itemK- type of vector collection keyV- type of vector collection value- Parameters:
collection- vector collectiontoKeyFn- function that extracts the key from the stream itemtoDocumentFn- function that createsVectorDocumentbased on the stream item
-
vectorCollection
@Nonnull public static <T,K, Sink<T> vectorCollectionV> (@Nonnull String collectionName, @Nonnull FunctionEx<? super T, ? extends K> toKeyFn, @Nonnull FunctionEx<? super T, ? extends V> toValueFn, @Nonnull FunctionEx<? super T, VectorValues> toVectorsFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.This sink internally limits number of parallel requests to not overload the members.
- Type Parameters:
T- type of stream itemK- type of vector collection keyV- type of vector collection value- Parameters:
collectionName- vector collection nametoKeyFn- function that extracts the key from the stream itemtoValueFn- function that extracts the value from the stream itemtoVectorsFn- function that extracts the vectors from the stream item
-
vectorCollection
@Nonnull public static <T,K, Sink<T> vectorCollectionV> (@Nonnull String collectionName, @Nonnull FunctionEx<? super T, ? extends K> toKeyFn, @Nonnull FunctionEx<? super T, VectorDocument<? extends V>> toDocumentFn) Returns a sink that writes vector documents with metadata and vector values to a vector collection.This sink internally limits number of parallel requests to not overload the members.
- Type Parameters:
T- type of stream itemK- type of vector collection keyV- type of vector collection value- Parameters:
collectionName- vector collection nametoKeyFn- function that extracts the key from the stream itemtoDocumentFn- function that createsVectorDocumentbased on the stream item
-