Tabnine Logo
NFACompiler$NFAFactoryCompiler.createLooping
Code IndexAdd Tabnine to your IDE (free)

How to use
createLooping
method
in
org.apache.flink.cep.nfa.compiler.NFACompiler$NFAFactoryCompiler

Best Java code snippets using org.apache.flink.cep.nfa.compiler.NFACompiler$NFAFactoryCompiler.createLooping (Showing top 4 results out of 315)

origin: org.apache.flink/flink-cep_2.10

private State<T> convertPattern(final State<T> sinkState) {
  final State<T> lastSink;
  final Quantifier quantifier = currentPattern.getQuantifier();
  if (quantifier.hasProperty(Quantifier.QuantifierProperty.LOOPING)) {
    // if loop has started then all notPatterns previous to the optional states are no longer valid
    final State<T> sink = copyWithoutTransitiveNots(sinkState);
    final State<T> looping = createLooping(sink);
    if (!quantifier.hasProperty(Quantifier.QuantifierProperty.OPTIONAL)) {
      lastSink = createInitMandatoryStateOfOneOrMore(looping);
    } else {
      lastSink = createInitOptionalStateOfZeroOrMore(looping, sinkState);
    }
  } else if (quantifier.hasProperty(Quantifier.QuantifierProperty.TIMES)) {
    lastSink = createTimesState(sinkState, currentPattern.getTimes());
  } else {
    lastSink = createSingletonState(sinkState);
  }
  addStopStates(lastSink);
  return lastSink;
}
origin: org.apache.flink/flink-cep_2.11

private State<T> convertPattern(final State<T> sinkState) {
  final State<T> lastSink;
  final Quantifier quantifier = currentPattern.getQuantifier();
  if (quantifier.hasProperty(Quantifier.QuantifierProperty.LOOPING)) {
    // if loop has started then all notPatterns previous to the optional states are no longer valid
    setCurrentGroupPatternFirstOfLoop(false);
    final State<T> sink = copyWithoutTransitiveNots(sinkState);
    final State<T> looping = createLooping(sink);
    setCurrentGroupPatternFirstOfLoop(true);
    lastSink = createTimesState(looping, sinkState, currentPattern.getTimes());
  } else if (quantifier.hasProperty(Quantifier.QuantifierProperty.TIMES)) {
    lastSink = createTimesState(sinkState, sinkState, currentPattern.getTimes());
  } else {
    lastSink = createSingletonState(sinkState);
  }
  addStopStates(lastSink);
  return lastSink;
}
origin: org.apache.flink/flink-cep

private State<T> convertPattern(final State<T> sinkState) {
  final State<T> lastSink;
  final Quantifier quantifier = currentPattern.getQuantifier();
  if (quantifier.hasProperty(Quantifier.QuantifierProperty.LOOPING)) {
    // if loop has started then all notPatterns previous to the optional states are no longer valid
    setCurrentGroupPatternFirstOfLoop(false);
    final State<T> sink = copyWithoutTransitiveNots(sinkState);
    final State<T> looping = createLooping(sink);
    setCurrentGroupPatternFirstOfLoop(true);
    lastSink = createTimesState(looping, sinkState, currentPattern.getTimes());
  } else if (quantifier.hasProperty(Quantifier.QuantifierProperty.TIMES)) {
    lastSink = createTimesState(sinkState, sinkState, currentPattern.getTimes());
  } else {
    lastSink = createSingletonState(sinkState);
  }
  addStopStates(lastSink);
  return lastSink;
}
origin: apache/flink

private State<T> convertPattern(final State<T> sinkState) {
  final State<T> lastSink;
  final Quantifier quantifier = currentPattern.getQuantifier();
  if (quantifier.hasProperty(Quantifier.QuantifierProperty.LOOPING)) {
    // if loop has started then all notPatterns previous to the optional states are no longer valid
    setCurrentGroupPatternFirstOfLoop(false);
    final State<T> sink = copyWithoutTransitiveNots(sinkState);
    final State<T> looping = createLooping(sink);
    setCurrentGroupPatternFirstOfLoop(true);
    lastSink = createTimesState(looping, sinkState, currentPattern.getTimes());
  } else if (quantifier.hasProperty(Quantifier.QuantifierProperty.TIMES)) {
    lastSink = createTimesState(sinkState, sinkState, currentPattern.getTimes());
  } else {
    lastSink = createSingletonState(sinkState);
  }
  addStopStates(lastSink);
  return lastSink;
}
org.apache.flink.cep.nfa.compilerNFACompiler$NFAFactoryCompilercreateLooping

Javadoc

Creates the given state as a looping one. Looping state is one with TAKE edge to itself and PROCEED edge to the sinkState. It also consists of a similar state without the PROCEED edge, so that for each PROCEED transition branches in computation state graph can be created only once.

Popular methods of NFACompiler$NFAFactoryCompiler

  • <init>
  • compileFactory
    Compiles the given pattern into a NFAFactory. The NFA factory can be used to create multiple NFAs.
  • getStates
  • addStopStateToLooping
  • addStopStates
  • convertPattern
  • copyWithoutTransitiveNots
    This method creates an alternative state that is target for TAKE transition from an optional State.
  • createEndingState
    Creates the dummy Final State of the NFA graph.
  • createMiddleStates
    Creates all the states between Start and Final state.
  • createSingletonState
    Creates a simple single state. For an OPTIONAL state it also consists of a similar state without the
  • createStartState
    Creates the Start State of the resulting NFA graph.
  • createState
    Creates a state with State.StateType#Normal and adds it to the collection of created states. Should
  • createStartState,
  • createState,
  • createStopState,
  • createTimesState,
  • getCurrentNotCondition,
  • getIgnoreCondition,
  • getInnerIgnoreCondition,
  • getWindowTime,
  • checkPatternNameUniqueness

Popular in Java

  • Running tasks concurrently on multiple threads
  • setContentView (Activity)
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now