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

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

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

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

currentGroupPattern = groupPattern;
currentPattern = groupPattern.getRawPattern();
lastSink = createMiddleStates(lastSink);
lastSink = convertPattern(lastSink);
if (isOptional) {
origin: org.apache.flink/flink-cep

currentGroupPattern = groupPattern;
currentPattern = groupPattern.getRawPattern();
lastSink = createMiddleStates(lastSink);
lastSink = convertPattern(lastSink);
if (isOptional) {
origin: org.apache.flink/flink-cep_2.11

/**
 * Create the states for the group pattern as a looping one.
 *
 * @param groupPattern the group pattern to create the states for
 * @param sinkState the state that the group pattern being converted should point to
 * @return the first state of the states of the group pattern
 */
private State<T> createLoopingGroupPatternState(
  final GroupPattern<T, ?> groupPattern,
  final State<T> sinkState) {
  final IterativeCondition<T> proceedCondition = getTrueFunction();
  Pattern<T, ?> oldCurrentPattern = currentPattern;
  Pattern<T, ?> oldFollowingPattern = followingPattern;
  GroupPattern<T, ?> oldGroupPattern = currentGroupPattern;
  final State<T> dummyState = createState(currentPattern.getName(), State.StateType.Normal);
  State<T> lastSink = dummyState;
  currentGroupPattern = groupPattern;
  currentPattern = groupPattern.getRawPattern();
  lastSink = createMiddleStates(lastSink);
  lastSink = convertPattern(lastSink);
  lastSink.addProceed(sinkState, proceedCondition);
  dummyState.addProceed(lastSink, proceedCondition);
  currentPattern = oldCurrentPattern;
  followingPattern = oldFollowingPattern;
  currentGroupPattern = oldGroupPattern;
  return lastSink;
}
origin: org.apache.flink/flink-cep

/**
 * Create the states for the group pattern as a looping one.
 *
 * @param groupPattern the group pattern to create the states for
 * @param sinkState the state that the group pattern being converted should point to
 * @return the first state of the states of the group pattern
 */
private State<T> createLoopingGroupPatternState(
  final GroupPattern<T, ?> groupPattern,
  final State<T> sinkState) {
  final IterativeCondition<T> proceedCondition = getTrueFunction();
  Pattern<T, ?> oldCurrentPattern = currentPattern;
  Pattern<T, ?> oldFollowingPattern = followingPattern;
  GroupPattern<T, ?> oldGroupPattern = currentGroupPattern;
  final State<T> dummyState = createState(currentPattern.getName(), State.StateType.Normal);
  State<T> lastSink = dummyState;
  currentGroupPattern = groupPattern;
  currentPattern = groupPattern.getRawPattern();
  lastSink = createMiddleStates(lastSink);
  lastSink = convertPattern(lastSink);
  lastSink.addProceed(sinkState, proceedCondition);
  dummyState.addProceed(lastSink, proceedCondition);
  currentPattern = oldCurrentPattern;
  followingPattern = oldFollowingPattern;
  currentGroupPattern = oldGroupPattern;
  return lastSink;
}
origin: org.apache.flink/flink-cep

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  checkPatternNameUniqueness();
  checkPatternSkipStrategy();
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
origin: org.apache.flink/flink-cep_2.11

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  checkPatternNameUniqueness();
  checkPatternSkipStrategy();
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
origin: org.apache.flink/flink-cep_2.10

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
origin: apache/flink

currentGroupPattern = groupPattern;
currentPattern = groupPattern.getRawPattern();
lastSink = createMiddleStates(lastSink);
lastSink = convertPattern(lastSink);
if (isOptional) {
origin: apache/flink

/**
 * Create the states for the group pattern as a looping one.
 *
 * @param groupPattern the group pattern to create the states for
 * @param sinkState the state that the group pattern being converted should point to
 * @return the first state of the states of the group pattern
 */
private State<T> createLoopingGroupPatternState(
  final GroupPattern<T, ?> groupPattern,
  final State<T> sinkState) {
  final IterativeCondition<T> proceedCondition = getTrueFunction();
  Pattern<T, ?> oldCurrentPattern = currentPattern;
  Pattern<T, ?> oldFollowingPattern = followingPattern;
  GroupPattern<T, ?> oldGroupPattern = currentGroupPattern;
  final State<T> dummyState = createState(currentPattern.getName(), State.StateType.Normal);
  State<T> lastSink = dummyState;
  currentGroupPattern = groupPattern;
  currentPattern = groupPattern.getRawPattern();
  lastSink = createMiddleStates(lastSink);
  lastSink = convertPattern(lastSink);
  lastSink.addProceed(sinkState, proceedCondition);
  dummyState.addProceed(lastSink, proceedCondition);
  currentPattern = oldCurrentPattern;
  followingPattern = oldFollowingPattern;
  currentGroupPattern = oldGroupPattern;
  return lastSink;
}
origin: apache/flink

/**
 * Compiles the given pattern into a {@link NFAFactory}. The NFA factory can be used to create
 * multiple NFAs.
 */
void compileFactory() {
  if (currentPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    throw new MalformedPatternException("NotFollowedBy is not supported as a last part of a Pattern!");
  }
  checkPatternNameUniqueness();
  checkPatternSkipStrategy();
  // we're traversing the pattern from the end to the beginning --> the first state is the final state
  State<T> sinkState = createEndingState();
  // add all the normal states
  sinkState = createMiddleStates(sinkState);
  // add the beginning state
  createStartState(sinkState);
}
org.apache.flink.cep.nfa.compilerNFACompiler$NFAFactoryCompilercreateMiddleStates

Javadoc

Creates all the states between Start and Final state.

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.
  • createLooping
    Creates the given state as a looping one. Looping state is one with TAKE edge to itself and PROCEED
  • 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

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • onRequestPermissionsResult (Fragment)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Top PhpStorm plugins
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