Class VectorSinks

java.lang.Object
com.hazelcast.vector.jet.VectorSinks

@Beta public final class VectorSinks extends Object
Factory methods for Vector collection sinks
Since:
5.5
  • Method Details

    • vectorCollection

      @Nonnull public static <T, K, V> Sink<T> vectorCollection(@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 item
      K - type of vector collection key
      V - type of vector collection value
      Parameters:
      collection - vector collection
      toKeyFn - function that extracts the key from the stream item
      toValueFn - function that extracts the value from the stream item
      toVectorsFn - function that extracts the vectors from the stream item
    • vectorCollection

      @Nonnull public static <T, K, V> Sink<T> vectorCollection(@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 item
      K - type of vector collection key
      V - type of vector collection value
      Parameters:
      collection - vector collection
      toKeyFn - function that extracts the key from the stream item
      toDocumentFn - function that creates VectorDocument based on the stream item
    • vectorCollection

      @Nonnull public static <T, K, V> Sink<T> vectorCollection(@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 item
      K - type of vector collection key
      V - type of vector collection value
      Parameters:
      collectionName - vector collection name
      toKeyFn - function that extracts the key from the stream item
      toValueFn - function that extracts the value from the stream item
      toVectorsFn - function that extracts the vectors from the stream item
    • vectorCollection

      @Nonnull public static <T, K, V> Sink<T> vectorCollection(@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 item
      K - type of vector collection key
      V - type of vector collection value
      Parameters:
      collectionName - vector collection name
      toKeyFn - function that extracts the key from the stream item
      toDocumentFn - function that creates VectorDocument based on the stream item