All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.enodeframework.domain.IMemoryCache Maven / Gradle / Ivy

There is a newer version: 1.1.10
Show newest version
package org.enodeframework.domain;

import java.util.concurrent.CompletableFuture;

public interface IMemoryCache {
    /**
     * Get an aggregate from memory cache.
     */
    CompletableFuture getAsync(Object aggregateRootId);

    /**
     * Get a strong type aggregate from memory cache.
     */
     CompletableFuture getAsync(Object aggregateRootId, Class aggregateRootType);

    /**
     * Accept the given aggregate root's changes.
     */
    void acceptAggregateRootChanges(IAggregateRoot aggregateRoot);

    /**
     * Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root.
     */
    CompletableFuture refreshAggregateFromEventStoreAsync(String aggregateRootTypeName, String aggregateRootId);

    /**
     * Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root.
     */
     CompletableFuture refreshAggregateFromEventStoreAsync(Class aggregateRootType, String aggregateRootId);

    /**
     * Start background tasks.
     */
    void start();

    /**
     * Stop background tasks.
     */
    void stop();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy