Class AhoCorasicSearchProcessorFactory.Processor

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

public static class AhoCorasicSearchProcessorFactory.Processor extends Object implements MultiSearchProcessor
  • Field Details

    • jumpTable

      private final int[] jumpTable
    • matchForNeedleId

      private final int[] matchForNeedleId
    • currentPosition

      private long currentPosition
  • Constructor Details

    • Processor

      Processor(int[] jumpTable, int[] matchForNeedleId)
  • 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.
    • getFoundNeedleId

      public int getFoundNeedleId()
      Specified by:
      getFoundNeedleId in interface MultiSearchProcessor
      Returns:
      the index of found search string (if any, or -1 if none) at current position of this MultiSearchProcessor
    • reset

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