org.enodeframework.domain.Repository.kt Maven / Gradle / Ivy
package org.enodeframework.domain
import java.util.concurrent.CompletableFuture
interface Repository {
/**
* Get an aggregate from memory cache, if not exist, get it from event store.
*/
fun getAsync(aggregateRootType: Class, aggregateRootId: String): CompletableFuture
/**
* Refresh memory cache with given aggregate.
*/
fun refreshAggregate(aggregateRoot: T)
}