Class BinaryObjectExImpl

    • Constructor Detail

      • BinaryObjectExImpl

        public BinaryObjectExImpl()
    • Method Detail

      • length

        public abstract int length()
        Returns:
        Length.
      • start

        public abstract int start()
        Returns:
        Object start.
      • hasArray

        public abstract boolean hasArray()
        Returns:
        True if object is array based.
      • array

        public abstract byte[] array()
        Returns:
        Object array if object is array based, otherwise null.
      • offheapAddress

        public abstract long offheapAddress()
        Returns:
        Object offheap address is object is offheap based, otherwise 0.
      • field

        @Nullable
        public abstract <F> F field​(int fieldId)
                             throws BinaryObjectException
        Gets field value.
        Parameters:
        fieldId - Field ID.
        Returns:
        Field value.
        Throws:
        BinaryObjectException - In case of any other error.
      • dataStartOffset

        public abstract int dataStartOffset()
        Get offset of data begin.
        Returns:
        Field value.
      • footerStartOffset

        public abstract int footerStartOffset()
        Get offset of the footer begin.
        Returns:
        Field value.
      • fieldByOrder

        @Nullable
        public abstract <F> F fieldByOrder​(int order)
        Get field by offset.
        Parameters:
        order - Field offset.
        Returns:
        Field value.
      • writeFieldByOrder

        protected abstract boolean writeFieldByOrder​(int fieldOffset,
                                                     ByteBuffer buf)
        Writes field value defined by the given field offset to the given byte buffer.
        Parameters:
        fieldOffset - Field offset.
        Returns:
        Boolean flag indicating whether the field was successfully written to the buffer, false if there is no enough space for the field in the buffer.
      • field

        @Nullable
        protected abstract <F> F field​(BinaryReaderHandles ctx,
                                       String fieldName)
        Parameters:
        ctx - Reader context.
        fieldName - Field name.
        Returns:
        Field value.
      • hasSchema

        public abstract boolean hasSchema()
        Returns:
        True if object has schema.
      • schemaId

        public abstract int schemaId()
        Get schema ID.
        Returns:
        Schema ID.
      • createSchema

        public abstract BinarySchema createSchema()
        Create schema for object.
        Returns:
        Schema.
      • context

        public abstract BinaryContext context()
        Get binary context.
        Returns:
        Binary context.
      • hasCircularReferences

        public boolean hasCircularReferences()
        Check if object graph has circular references.
        Returns:
        true if object has circular references.