Codota Logo
AnnotatedAggregate.publish
Code IndexAdd Codota to your IDE (free)

How to use
publish
method
in
org.axonframework.modelling.command.inspection.AnnotatedAggregate

Best Java code snippets using org.axonframework.modelling.command.inspection.AnnotatedAggregate.publish (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ScheduledThreadPoolExecutor s =
  • Codota Iconnew ScheduledThreadPoolExecutor(corePoolSize)
  • Codota IconThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
  • Codota IconString str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
  • Smart code suggestions by Codota
}
origin: AxonFramework/AxonFramework

@Override
protected <P> ApplyMore doApply(P payload, MetaData metaData) {
  if (!applying && aggregateRoot != null) {
    applying = true;
    try {
      publish(createMessage(payload, metaData));
      while (!delayedTasks.isEmpty()) {
        delayedTasks.remove().run();
      }
    } finally {
      delayedTasks.clear();
      applying = false;
    }
  } else {
    delayedTasks.add(() -> publish(createMessage(payload, metaData)));
  }
  return this;
}
origin: AxonFramework/AxonFramework

@Override
protected void publish(EventMessage<?> msg) {
  super.publish(msg);
  snapshotTrigger.eventHandled(msg);
  if (identifierAsString() == null) {
    throw new IncompatibleAggregateException("Aggregate identifier must be non-null after applying an event. " +
                             "Make sure the aggregate identifier is initialized at " +
                             "the latest when handling the creation event.");
  }
}
origin: org.axonframework/axon-modelling

@Override
protected <P> ApplyMore doApply(P payload, MetaData metaData) {
  if (!applying && aggregateRoot != null) {
    applying = true;
    try {
      publish(createMessage(payload, metaData));
      while (!delayedTasks.isEmpty()) {
        delayedTasks.remove().run();
      }
    } finally {
      delayedTasks.clear();
      applying = false;
    }
  } else {
    delayedTasks.add(() -> publish(createMessage(payload, metaData)));
  }
  return this;
}
origin: org.axonframework/axon-eventsourcing

@Override
protected void publish(EventMessage<?> msg) {
  super.publish(msg);
  snapshotTrigger.eventHandled(msg);
  if (identifierAsString() == null) {
    throw new IncompatibleAggregateException("Aggregate identifier must be non-null after applying an event. " +
                             "Make sure the aggregate identifier is initialized at " +
                             "the latest when handling the creation event.");
  }
}
org.axonframework.modelling.command.inspectionAnnotatedAggregatepublish

Javadoc

Publish an event to the aggregate root and its entities first and external event handlers (using the given event bus) later.

Popular methods of AnnotatedAggregate

  • initialize
    Initialize an aggregate created by the given aggregateFactory which is described in the given aggreg
  • getAggregateRoot
    Get the annotated aggregate instance. Note that this method should probably never be used in normal
  • handle
  • publishOnEventBus
    Publish an event to external event handlers using the given event bus.
  • <init>
    Initialize an Aggregate instance for the given aggregateRoot, described by the given aggregateModel
  • andThen
  • apply
  • applyMessageOrPayload
    Apply a new event message to the aggregate and then publish this message to external systems. If the
  • createMessage
    Creates an EventMessage with given payload and metaData.
  • doApply
  • execute
  • executeWithResult
  • execute,
  • executeWithResult,
  • identifier,
  • identifierAsString,
  • initSequence,
  • isDeleted,
  • registerRoot,
  • type,
  • version

Popular in Java

  • Running tasks concurrently on multiple threads
  • onCreateOptionsMenu (Activity)
  • getApplicationContext (Context)
  • getSystemService (Context)
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
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