org.enodeframework.domain.IRepository Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of enode Show documentation
Show all versions of enode Show documentation
The enodeframework core implementation.
package org.enodeframework.domain;
import java.util.concurrent.CompletableFuture;
public interface IRepository {
/**
* Get an aggregate from memory cache, if not exist, get it from event store.
*/
CompletableFuture getAsync(Class aggregateRootType, Object aggregateRootId);
/**
* Get an aggregate from memory cache, if not exist, get it from event store.
*/
CompletableFuture getAsync(Object aggregateRootId);
/**
* Refresh memory cache with given aggregate.
*/
void refreshAggregate(T aggregateRoot);
}