memento.memory.MemoryEventBus.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of memento-api-tck Show documentation
Show all versions of memento-api-tck Show documentation
Memento tries to provide a high level abstraction for different EventStore implementations
The newest version!
package memento.memory
import memento.EventBusPort
import memento.EventSerdePort
import memento.model.Event
import memento.model.SnapshotEvent
import groovy.util.logging.Slf4j
@Slf4j
class MemoryEventBus implements EventBusPort {
@Override
void publish(Event event, EventSerdePort serdePort) {
if (!(event instanceof SnapshotEvent)) {
MemoryEventBus.log.debug("publishing an event store event: ${serdePort.eventToJSON(event)}")
}
}
@Override
void publishAsync(Event event, EventSerdePort serdePort) {
this.publish(event, serdePort)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy