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

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

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

origin: apache/flink

@Override
public boolean equals(Object obj) {
  if (obj instanceof StateTransition) {
    @SuppressWarnings("unchecked")
    StateTransition<T> other = (StateTransition<T>) obj;
    return action == other.action &&
      sourceState.getName().equals(other.sourceState.getName()) &&
      targetState.getName().equals(other.targetState.getName());
  } else {
    return false;
  }
}
origin: apache/flink

@Override
public int hashCode() {
  // we have to take the name of targetState because the transition might be reflexive
  return Objects.hash(action, targetState.getName(), sourceState.getName());
}
origin: apache/flink

private static <T> boolean isEquivalentState(final State<T> s1, final State<T> s2) {
  return s1.getName().equals(s2.getName());
}
origin: apache/flink

private Map<String, State<T>> loadStates(final Collection<State<T>> validStates) {
  Map<String, State<T>> tmp = new HashMap<>(4);
  for (State<T> state : validStates) {
    tmp.put(state.getName(), state);
  }
  return Collections.unmodifiableMap(tmp);
}
origin: apache/flink

@Override
public String toString() {
  return new StringBuilder()
      .append("StateTransition(")
      .append(action).append(", ")
      .append("from ").append(sourceState.getName())
      .append("to ").append(targetState.getName())
      .append(condition != null ? ", with condition)" : ")")
      .toString();
}
origin: apache/flink

private void addComputationState(
    SharedBufferAccessor<T> sharedBufferAccessor,
    List<ComputationState> computationStates,
    State<T> currentState,
    NodeId previousEntry,
    DeweyNumber version,
    long startTimestamp,
    EventId startEventId) throws Exception {
  ComputationState computationState = ComputationState.createState(
      currentState.getName(), previousEntry, version, startTimestamp, startEventId);
  computationStates.add(computationState);
  sharedBufferAccessor.lockNode(previousEntry);
}
origin: apache/flink

public NFAState createInitialNFAState() {
  Queue<ComputationState> startingStates = new LinkedList<>();
  for (State<T> state : states.values()) {
    if (state.isStart()) {
      startingStates.add(ComputationState.createStartState(state.getName()));
    }
  }
  return new NFAState(startingStates);
}
origin: apache/flink

private <T> Set<Tuple2<String, StateTransitionAction>> unfoldTransitions(final State<T> state) {
  final Set<Tuple2<String, StateTransitionAction>> transitions = new HashSet<>();
  for (StateTransition<T> transition : state.getStateTransitions()) {
    transitions.add(Tuple2.of(
      transition.getTargetState().getName(),
      transition.getAction()));
  }
  return transitions;
}
origin: apache/flink

private State<T> copy(final State<T> state) {
  final State<T> copyOfState = createState(
    NFAStateNameHandler.getOriginalNameFromInternal(state.getName()),
    state.getStateType());
  for (StateTransition<T> tStateTransition : state.getStateTransitions()) {
    copyOfState.addStateTransition(
      tStateTransition.getAction(),
      tStateTransition.getTargetState().equals(tStateTransition.getSourceState())
          ? copyOfState
          : tStateTransition.getTargetState(),
      tStateTransition.getCondition());
  }
  return copyOfState;
}
origin: apache/flink

final State<T> copyOfSink = createState(sinkState.getName(), sinkState.getStateType());
    if (targetState.isStop()) {
      for (Tuple2<IterativeCondition<T>, String> notCondition : currentNotCondition) {
        if (targetState.getName().equals(notCondition.f1)) {
          remove = true;
origin: apache/flink

stateMap.put(state.getName(), state);
origin: apache/flink

@Test
public void testNoUnnecessaryStateCopiesCreated() {
  final Pattern<Event, Event> pattern = Pattern.<Event>begin("start").where(startFilter)
    .notFollowedBy("not").where(startFilter)
    .followedBy("oneOrMore").where(startFilter).oneOrMore()
    .followedBy("end").where(endFilter);
  final NFACompiler.NFAFactoryCompiler<Event> nfaFactoryCompiler = new NFACompiler.NFAFactoryCompiler<>(pattern);
  nfaFactoryCompiler.compileFactory();
  int endStateCount = 0;
  for (State<Event> state : nfaFactoryCompiler.getStates()) {
    if (state.getName().equals("end")) {
      endStateCount++;
    }
  }
  assertEquals(1, endStateCount);
}
origin: apache/flink

if (untilCondition != null) {
  State<T> sinkStateCopy = copy(sinkState);
  originalStateMap.put(sinkState.getName(), sinkStateCopy);
origin: apache/flink

if (untilCondition != null) {
  singletonState.addProceed(
    originalStateMap.get(proceedState.getName()),
    new RichAndCondition<>(proceedCondition, untilCondition));
origin: apache/flink

State<T> sinkStateCopy = copy(sinkState);
loopingState.addProceed(sinkStateCopy, new RichAndCondition<>(proceedCondition, untilCondition));
originalStateMap.put(sinkState.getName(), sinkStateCopy);
origin: apache/flink

currentState.getName(),
event.getEventId(),
previousEntry,
origin: org.apache.flink/flink-cep

@Override
public int hashCode() {
  // we have to take the name of targetState because the transition might be reflexive
  return Objects.hash(action, targetState.getName(), sourceState.getName());
}
origin: org.apache.flink/flink-cep_2.10

private State<T> getStateByName(String name, NFA<T> nfa) {
  for (State<T> state: nfa.states) {
    if (state.getName().equals(name)) {
      return state;
    }
  }
  return null;
}
origin: org.apache.flink/flink-cep_2.10

@Override
public String toString() {
  return new StringBuilder()
      .append("StateTransition(")
      .append(action).append(", ")
      .append("from ").append(sourceState.getName())
      .append("to ").append(targetState.getName())
      .append(newCondition != null ? ", with condition)" : ")")
      .toString();
}
origin: org.apache.flink/flink-cep_2.10

  @Override
  public boolean apply(@Nullable ComputationState<T> input) {
    return input != null && input.getState().getName().equals(BEGINNING_STATE_NAME);
  }
}).getState();
org.apache.flink.cep.nfaStategetName

Popular methods of State

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

Popular in Java

  • Running tasks concurrently on multiple threads
  • setScale (BigDecimal)
  • startActivity (Activity)
  • addToBackStack (FragmentTransaction)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JList (javax.swing)
  • JTextField (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top plugins for Android Studio
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