Tabnine Logo
State.addProceed
Code IndexAdd Tabnine to your IDE (free)

How to use
addProceed
method
in
org.apache.flink.cep.nfa.State

Best Java code snippets using org.apache.flink.cep.nfa.State.addProceed (Showing top 20 results out of 315)

origin: apache/flink

private void addStopStates(final State<T> state) {
  for (Tuple2<IterativeCondition<T>, String> notCondition: getCurrentNotCondition()) {
    final State<T> stopState = createStopState(notCondition.f0, notCondition.f1);
    state.addProceed(stopState, notCondition.f0);
  }
}
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

private void addStopStateToLooping(final State<T> loopingState) {
  if (followingPattern != null &&
      followingPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    final IterativeCondition<T> notCondition = getTakeCondition(followingPattern);
    final State<T> stopState = createStopState(notCondition, followingPattern.getName());
    loopingState.addProceed(stopState, notCondition);
  }
}
origin: apache/flink

lastSink.addProceed(proceedState, proceedCondition);
origin: apache/flink

    (IterativeCondition<T>) currentPattern.getUntilCondition();
  if (untilCondition != null) {
    singletonState.addProceed(
      originalStateMap.get(proceedState.getName()),
      new RichAndCondition<>(proceedCondition, untilCondition));
  singletonState.addProceed(proceedState,
    untilCondition != null
      ? new RichAndCondition<>(proceedCondition, new RichNotCondition<>(untilCondition))
      : proceedCondition);
} else {
  singletonState.addProceed(proceedState, proceedCondition);
origin: apache/flink

  if (untilCondition != null) {
    State<T> sinkStateCopy = copy(sinkState);
    loopingState.addProceed(sinkStateCopy, new RichAndCondition<>(proceedCondition, untilCondition));
    originalStateMap.put(sinkState.getName(), sinkStateCopy);
  loopingState.addProceed(sinkState,
    untilCondition != null
      ? new RichAndCondition<>(proceedCondition, new RichNotCondition<>(untilCondition))
  updateWithGreedyCondition(sinkState, getTakeCondition(currentPattern));
} else {
  loopingState.addProceed(sinkState, proceedCondition);
origin: apache/flink

    notNext.addProceed(lastSink, new RichNotCondition<>(notCondition));
  notNext.addProceed(stopState, notCondition);
  lastSink = notNext;
} else {
origin: org.apache.flink/flink-cep_2.11

private void addStopStates(final State<T> state) {
  for (Tuple2<IterativeCondition<T>, String> notCondition: getCurrentNotCondition()) {
    final State<T> stopState = createStopState(notCondition.f0, notCondition.f1);
    state.addProceed(stopState, notCondition.f0);
  }
}
origin: org.apache.flink/flink-cep_2.10

private void addStopStates(final State<T> state) {
  for (Tuple2<IterativeCondition<T>, String> notCondition: getCurrentNotCondition()) {
    final State<T> stopState = createStopState(notCondition.f0, notCondition.f1);
    state.addProceed(stopState, notCondition.f0);
  }
}
origin: org.apache.flink/flink-cep

private void addStopStates(final State<T> state) {
  for (Tuple2<IterativeCondition<T>, String> notCondition: getCurrentNotCondition()) {
    final State<T> stopState = createStopState(notCondition.f0, notCondition.f1);
    state.addProceed(stopState, notCondition.f0);
  }
}
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_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

private void addStopStateToLooping(final State<T> loopingState) {
  if (followingPattern != null &&
      followingPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    final IterativeCondition<T> notCondition = getTakeCondition(followingPattern);
    final State<T> stopState = createStopState(notCondition, followingPattern.getName());
    loopingState.addProceed(stopState, notCondition);
  }
}
origin: org.apache.flink/flink-cep_2.10

private void addStopStateToLooping(final State<T> loopingState) {
  if (followingPattern != null &&
      followingPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    final IterativeCondition<T> notCondition = (IterativeCondition<T>) followingPattern.getCondition();
    final State<T> stopState = createStopState(notCondition, followingPattern.getName());
    loopingState.addProceed(stopState, notCondition);
  }
}
origin: org.apache.flink/flink-cep_2.11

private void addStopStateToLooping(final State<T> loopingState) {
  if (followingPattern != null &&
      followingPattern.getQuantifier().getConsumingStrategy() == Quantifier.ConsumingStrategy.NOT_FOLLOW) {
    final IterativeCondition<T> notCondition = getTakeCondition(followingPattern);
    final State<T> stopState = createStopState(notCondition, followingPattern.getName());
    loopingState.addProceed(stopState, notCondition);
  }
}
origin: org.apache.flink/flink-cep

lastSink.addProceed(proceedState, proceedCondition);
origin: org.apache.flink/flink-cep_2.10

/**
 * Creates a pair of states that enables relaxed strictness before a zeroOrMore looping state.
 *
 * @param loopingState the first state of zeroOrMore complex state
 * @param lastSink     the state that the looping one points to
 * @return the newly created state
 */
@SuppressWarnings("unchecked")
private State<T> createInitOptionalStateOfZeroOrMore(final State<T> loopingState, final State<T> lastSink) {
  final IterativeCondition<T> currentCondition = (IterativeCondition<T>) currentPattern.getCondition();
  final State<T> firstState = createState(currentPattern.getName(), State.StateType.Normal);
  firstState.addProceed(lastSink, BooleanConditions.<T>trueFunction());
  firstState.addTake(loopingState, currentCondition);
  final IterativeCondition<T> ignoreFunction = getIgnoreCondition(currentPattern);
  if (ignoreFunction != null) {
    final State<T> firstStateWithoutProceed = createState(currentPattern.getName(), State.StateType.Normal);
    firstState.addIgnore(firstStateWithoutProceed, ignoreFunction);
    firstStateWithoutProceed.addIgnore(ignoreFunction);
    firstStateWithoutProceed.addTake(loopingState, currentCondition);
    addStopStates(firstStateWithoutProceed);
  }
  return firstState;
}
origin: org.apache.flink/flink-cep_2.10

singletonState.addProceed(sinkState, trueFunction);
origin: org.apache.flink/flink-cep_2.10

/**
 * 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.
 *
 * @param sinkState the state that the converted state should point to
 * @return the first state of the created complex state
 */
@SuppressWarnings("unchecked")
private State<T> createLooping(final State<T> sinkState) {
  final IterativeCondition<T> currentCondition = (IterativeCondition<T>) currentPattern.getCondition();
  final IterativeCondition<T> ignoreCondition = getInnerIgnoreCondition(currentPattern);
  final IterativeCondition<T> trueFunction = BooleanConditions.trueFunction();
  final State<T> loopingState = createState(currentPattern.getName(), State.StateType.Normal);
  loopingState.addProceed(sinkState, trueFunction);
  loopingState.addTake(currentCondition);
  addStopStateToLooping(loopingState);
  if (ignoreCondition != null) {
    final State<T> ignoreState = createState(currentPattern.getName(), State.StateType.Normal);
    ignoreState.addTake(loopingState, currentCondition);
    ignoreState.addIgnore(ignoreCondition);
    loopingState.addIgnore(ignoreState, ignoreCondition);
    addStopStateToLooping(ignoreState);
  }
  return loopingState;
}
origin: org.apache.flink/flink-cep_2.10

singletonState.addProceed(sinkState, BooleanConditions.<T>trueFunction());
org.apache.flink.cep.nfaStateaddProceed

Popular methods of State

  • <init>
  • addIgnore
  • addTake
  • getName
  • getStateTransitions
  • isFinal
  • isStart
  • addStateTransition
  • equals
  • getStateType
  • isStop
  • makeStart
  • isStop,
  • makeStart

Popular in Java

  • Making http post requests using okhttp
  • setScale (BigDecimal)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getApplicationContext (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFrame (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
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