Codota Logo
Segment.matches
Code IndexAdd Codota to your IDE (free)

How to use
matches
method
in
org.axonframework.eventhandling.Segment

Best Java code snippets using org.axonframework.eventhandling.Segment.matches (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: AxonFramework/AxonFramework

/**
 * Checks whether the given {@code sagaId} matches with the given {@code segment}.
 * <p>
 * For any complete set of segments, exactly one segment matches with any value.
 * <p>
 *
 * @param segment The segment to validate the identifier for
 * @param sagaId  The identifier to test
 * @return {@code true} if the identifier matches the segment, otherwise {@code false}
 *
 * @implSpec This implementation uses the {@link Segment#matches(Object)} to match against the Saga identifier
 */
protected boolean matchesSegment(Segment segment, String sagaId) {
  return segment.matches(sagaId);
}
origin: AxonFramework/AxonFramework

/**
 * Indicates whether the given {@code value} matches this segment. A value matches when the hashCode of a value,
 * after applying this segments mask, equals to this segment ID.
 *
 * @param value The value to verify against.
 * @return {@code true} if the given value matches this segment, otherwise {@code false}
 */
public boolean matches(Object value) {
  return mask == 0 || matches(Objects.hashCode(value));
}
origin: AxonFramework/AxonFramework

@Override
public boolean canHandle(EventMessage<?> eventMessage, Segment segment) {
  return hasHandler(eventMessage) && segment.matches(Objects.hashCode(getOrDefault(
      sequencingPolicy.getSequenceIdentifierFor(eventMessage),
      eventMessage::getIdentifier)
  ));
}
origin: AxonFramework/AxonFramework

private boolean shouldCreateSaga(Segment segment, boolean sagaInvoked,
                 SagaInitializationPolicy initializationPolicy) {
  return ((initializationPolicy.getCreationPolicy() == SagaCreationPolicy.ALWAYS
      || (!sagaInvoked && initializationPolicy.getCreationPolicy() == SagaCreationPolicy.IF_NONE_FOUND)))
      && segment.matches(initializationPolicy.getInitialAssociationValue());
}
origin: org.axonframework/axon-modelling

/**
 * Checks whether the given {@code sagaId} matches with the given {@code segment}.
 * <p>
 * For any complete set of segments, exactly one segment matches with any value.
 * <p>
 *
 * @param segment The segment to validate the identifier for
 * @param sagaId  The identifier to test
 * @return {@code true} if the identifier matches the segment, otherwise {@code false}
 *
 * @implSpec This implementation uses the {@link Segment#matches(Object)} to match against the Saga identifier
 */
protected boolean matchesSegment(Segment segment, String sagaId) {
  return segment.matches(sagaId);
}
origin: org.axonframework/axon-core

/**
 * Checks whether the given {@code sagaId} matches with the given {@code segment}.
 * <p>
 * For any complete set of segments, exactly one segment matches with any value.
 * <p>
 *
 * @param segment The segment to validate the identifier for
 * @param sagaId  The identifier to test
 * @return {@code true} if the identifier matches the segment, otherwise {@code false}
 *
 * @implSpec This implementation uses the {@link Segment#matches(Object)} to match against the Saga identifier
 */
protected boolean matchesSegment(Segment segment, String sagaId) {
  return segment.matches(sagaId);
}
origin: org.axonframework/axon-messaging

/**
 * Indicates whether the given {@code value} matches this segment. A value matches when the hashCode of a value,
 * after applying this segments mask, equals to this segment ID.
 *
 * @param value The value to verify against.
 * @return {@code true} if the given value matches this segment, otherwise {@code false}
 */
public boolean matches(Object value) {
  return mask == 0 || matches(Objects.hashCode(value));
}
origin: org.axonframework/axon-core

/**
 * Indicates whether the given {@code value} matches this segment. A value matches when the hashCode of a value,
 * after applying this segments mask, equals to this segment ID.
 *
 * @param value The value to verify against.
 * @return {@code true} if the given value matches this segment, otherwise {@code false}
 */
public boolean matches(Object value) {
  return mask == 0 || matches(Objects.hashCode(value));
}
origin: org.axonframework/axon-core

@Override
public boolean canHandle(EventMessage<?> eventMessage, Segment segment) {
  return hasHandler(eventMessage)
      && segment.matches(Objects.hashCode(getOrDefault(sequencingPolicy.getSequenceIdentifierFor(eventMessage),
                               eventMessage::getIdentifier)));
}
origin: org.axonframework/axon-messaging

@Override
public boolean canHandle(EventMessage<?> eventMessage, Segment segment) {
  return hasHandler(eventMessage) && segment.matches(Objects.hashCode(getOrDefault(
      sequencingPolicy.getSequenceIdentifierFor(eventMessage),
      eventMessage::getIdentifier)
  ));
}
origin: org.axonframework/axon-core

private boolean shouldCreateSaga(Segment segment, boolean sagaInvoked,
                 SagaInitializationPolicy initializationPolicy) {
  return ((initializationPolicy.getCreationPolicy() == SagaCreationPolicy.ALWAYS
      || (!sagaInvoked && initializationPolicy.getCreationPolicy() == SagaCreationPolicy.IF_NONE_FOUND)))
      && segment.matches(initializationPolicy.getInitialAssociationValue());
}
origin: org.axonframework/axon-modelling

private boolean shouldCreateSaga(Segment segment, boolean sagaInvoked,
                 SagaInitializationPolicy initializationPolicy) {
  return ((initializationPolicy.getCreationPolicy() == SagaCreationPolicy.ALWAYS
      || (!sagaInvoked && initializationPolicy.getCreationPolicy() == SagaCreationPolicy.IF_NONE_FOUND)))
      && segment.matches(initializationPolicy.getInitialAssociationValue());
}
org.axonframework.eventhandlingSegmentmatches

Javadoc

Returns true when the mask applied to the given value, matches the segment id.

Popular methods of Segment

  • getMask
    Getter for the segment mask.
  • <init>
  • computeSegments
    Compute the Segment's from a given list of segmentId's.
  • getSegmentId
    Getter for the segment identifier.
  • isMergeableWith
    Indicates whether this segment can be merged with the given other segment. Two segments can be merge
  • mergeableSegmentId
    Returns the #getSegmentId() of the segment this one can be merged with
  • split
    Returns an array with two Segment. The first entry contains the original segmentId, with the newly

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • onCreateOptionsMenu (Activity)
  • FileWriter (java.io)
    Convenience class for writing character files. The constructors of this class assume that the defaul
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now