Class RelationshipsBuilder


  • public class RelationshipsBuilder
    extends java.lang.Object
    • Method Detail

      • add

        public void add​(long originalSourceId,
                        long originalTargetId)
      • add

        public void add​(long source,
                        long target,
                        double relationshipPropertyValue)
      • add

        public void add​(long source,
                        long target,
                        double[] relationshipPropertyValues)
      • addFromInternal

        public boolean addFromInternal​(long mappedSourceId,
                                       long mappedTargetId)
      • addFromInternal

        public boolean addFromInternal​(long mappedSourceId,
                                       long mappedTargetId,
                                       double relationshipPropertyValue)
      • addFromInternal

        public boolean addFromInternal​(long source,
                                       long target,
                                       double[] relationshipPropertyValues)
      • build

        public SingleTypeRelationships build​(java.util.Optional<AdjacencyCompressor.ValueMapper> mapper,
                                             java.util.Optional<java.util.function.LongConsumer> drainCountConsumer)
        Parameters:
        mapper - A mapper to transform values before compressing them. Implementations must be thread-safe.
        drainCountConsumer - A consumer which is called once a ChunkedAdjacencyLists has been drained and its contents are written to the adjacency list. The consumer receives the number of relationships that have been written. Implementations must be thread-safe.