diff options
Diffstat (limited to 'document/src/main/java/com/yahoo/document/serialization/DocumentSerializerFactory.java')
-rw-r--r-- | document/src/main/java/com/yahoo/document/serialization/DocumentSerializerFactory.java | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/document/src/main/java/com/yahoo/document/serialization/DocumentSerializerFactory.java b/document/src/main/java/com/yahoo/document/serialization/DocumentSerializerFactory.java index 7ff58855c34..54ec4e2fcca 100644 --- a/document/src/main/java/com/yahoo/document/serialization/DocumentSerializerFactory.java +++ b/document/src/main/java/com/yahoo/document/serialization/DocumentSerializerFactory.java @@ -12,26 +12,34 @@ public class DocumentSerializerFactory { /** * Creates a serializer for the current head document format. - * This format is an extension of the 4.2 format. + * This format is an extension of the 6.x format. */ public static DocumentSerializer createHead(GrowableByteBuffer buf) { return new VespaDocumentSerializerHead(buf); } /** - * Creates a serializer for the document format that was created on Vespa 4.2. + * Creates a serializer for the 6.x document format. + * This format is an extension of the 4.2 format. */ - @SuppressWarnings("deprecation") - public static DocumentSerializer create42(GrowableByteBuffer buf) { - return new VespaDocumentSerializer42(buf); + public static DocumentSerializer create6(GrowableByteBuffer buf) { + return new VespaDocumentSerializer6(buf); + } + + /** + * Creates a serializer for the 6.x document format. + * This format is an extension of the 4.2 format. + */ + public static DocumentSerializer create6() { + return new VespaDocumentSerializer6(new GrowableByteBuffer()); } /** * Creates a serializer for the document format that was created on Vespa 4.2. */ @SuppressWarnings("deprecation") - public static DocumentSerializer create42(GrowableByteBuffer buf, boolean headerOnly) { - return new VespaDocumentSerializer42(buf, headerOnly); + public static DocumentSerializer create42(GrowableByteBuffer buf) { + return new VespaDocumentSerializer42(buf); } /** |