Class VespaDocumentSerializer6

    • Method Detail

      • write

        public void write​(Document doc)
        Description copied from interface: DocumentWriter
        write out a document
        Specified by:
        write in interface DocumentWriter
        Parameters:
        doc - document to be written
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          Document doc)
        Description copied from interface: FieldWriter
        Write out the value of field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - field description (name and data type)
        doc - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          FieldValue value)
        Write out the value of field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public <T extends FieldValue> void write​(com.yahoo.vespa.objects.FieldBase field,
                                                 Array<T> array)
        Write out the value of array field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        array - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          ByteFieldValue value)
        Write out the value of byte field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          BoolFieldValue value)
        Description copied from interface: FieldWriter
        Write out the value of byte field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - field description (name and data type)
        value - field value
      • write

        public <T extends FieldValue> void write​(com.yahoo.vespa.objects.FieldBase field,
                                                 CollectionFieldValue<T> value)
        Write out the value of collection field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          DoubleFieldValue value)
        Write out the value of double field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          FloatFieldValue value)
        Write out the value of float field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          IntegerFieldValue value)
        Write out the value of integer field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          LongFieldValue value)
        Write out the value of long field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          Raw value)
        Write out the value of raw field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          PredicateFieldValue value)
        Description copied from interface: FieldWriter
        Write out the value of predicate field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - field description (name and data type)
        value - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          StringFieldValue value)
        Write out the value of string field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          TensorFieldValue value)
        Description copied from interface: FieldWriter
        Write out the value of the given tensor field value.
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - field description (name and data type)
        value - tensor field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          ReferenceFieldValue value)
        Description copied from interface: FieldWriter
        Write out the value of the given reference field value.
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - field description (name and data type)
        value - reference field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          Struct s)
        Write out the value of struct field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        s - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          StructuredFieldValue value)
        Write out the value of structured field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        value - - field value
      • write

        public <T extends FieldValue> void write​(com.yahoo.vespa.objects.FieldBase field,
                                                 WeightedSet<T> ws)
        Write out the value of weighted set field
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - - field description (name and data type)
        ws - - field value
      • write

        public void write​(com.yahoo.vespa.objects.FieldBase field,
                          AnnotationReference value)
        Description copied from interface: FieldWriter
        Write out the value of annotation data.
        Specified by:
        write in interface FieldWriter
        Parameters:
        field - field description (name and data type)
        value - field value
      • getSerializedSize

        public static long getSerializedSize​(Document doc)
        Returns the serialized size of the given Document. Please note that this method performs actual serialization of the document, but simply return the size of the final GrowableByteBuffer. If you need the buffer itself, do NOT use this method.
        Parameters:
        doc - The Document whose size to calculate.
        Returns:
        The size in bytes.