Class AbstractMatchEntrySerializer.ConstantHeaderWriter<E,​M>

  • Type Parameters:
    E - Match entry type
    M - Match entry mask type, use Void a mask is not applicable
    Enclosing class:
    AbstractMatchEntrySerializer<E,​M>

    protected static final class AbstractMatchEntrySerializer.ConstantHeaderWriter<E,​M>
    extends AbstractMatchEntrySerializer.HeaderWriter<E,​M>
    Utility AbstractMatchEntrySerializer.HeaderWriter optimized for cases where the header does not depend on the actual entry content beyond presence/absence of a mask. This class pre-computes the possible header values for masked/unmasked cases and stores them internally for reuse.
    • Constructor Detail

      • ConstantHeaderWriter

        protected ConstantHeaderWriter​(int withMask,
                                       int withoutMask)
      • ConstantHeaderWriter

        protected ConstantHeaderWriter​(int oxmClassCode,
                                       int oxmFieldCode,
                                       int valueLength)
      • ConstantHeaderWriter

        protected ConstantHeaderWriter​(int oxmClassCode,
                                       int oxmFieldCode,
                                       int valueLength,
                                       int extraLength)
    • Method Detail

      • writeHeader

        protected void writeHeader​(E entry,
                                   M mask,
                                   io.netty.buffer.ByteBuf outBuffer)
        Description copied from class: AbstractMatchEntrySerializer.HeaderWriter
        Write out the header for a particular entry, containing specified mask, to the provided output buffer.
        Specified by:
        writeHeader in class AbstractMatchEntrySerializer.HeaderWriter<E,​M>
        Parameters:
        entry - match entry for which to write the header
        mask - mask as extracted from the match entry, may be null
        outBuffer - output buffer