- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {ScheduledThreadPoolExecutor s =
new ScheduledThreadPoolExecutor(corePoolSize)
ThreadFactory threadFactory;new ScheduledThreadPoolExecutor(corePoolSize, threadFactory)
String str;new ScheduledThreadPoolExecutor(1, new ThreadFactoryBuilder().setNameFormat(str).build())
- Smart code suggestions by Codota
}
@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; }
@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."); } }
@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; }
@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."); } }