Class KmpSearchProcessorFactory.Processor

java.lang.Object
io.netty.buffer.search.KmpSearchProcessorFactory.Processor
All Implemented Interfaces:
SearchProcessor, ByteProcessor
Enclosing class:
KmpSearchProcessorFactory

public static class KmpSearchProcessorFactory.Processor extends Object implements SearchProcessor
  • Field Details

    • needle

      private final byte[] needle
    • jumpTable

      private final int[] jumpTable
    • currentPosition

      private long currentPosition
  • Constructor Details

    • Processor

      Processor(byte[] needle, int[] jumpTable)
  • Method Details

    • process

      public boolean process(byte value)
      Specified by:
      process in interface ByteProcessor
      Returns:
      true if the processor wants to continue the loop and handle the next byte in the buffer. false if the processor wants to stop handling bytes and abort the loop.
    • reset

      public void reset()
      Description copied from interface: SearchProcessor
      Resets the state of SearchProcessor.
      Specified by:
      reset in interface SearchProcessor