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

pro.jk.ejoker.domain.IMemoryCache Maven / Gradle / Ivy

There is a newer version: 3.0.7.1
Show newest version
package pro.jk.ejoker.domain;

import java.util.concurrent.Future;

public interface IMemoryCache {
	
        /**
         * Get an aggregate from memory cache.
         * @param aggregateRootId
         * @param aggregateRootType
         * @return
         */
        public Future getAsync(Object aggregateRootId, Class aggregateRootType);
        
//        /**
//         * Set an aggregate to memory cache.
//         * @param aggregateRoot
//         */
//        public void set(IAggregateRoot aggregateRoot);
//        
//        /**
//         * Refresh the aggregate memory cache by replaying events of event store.
//         * @param aggregateRootTypeName
//         * @param aggregateRootId
//         */
//        public SystemFutureWrapper refreshAggregateFromEventStoreAsync(String aggregateRootTypeName, String aggregateRootId);
//        
//        /**
//         * Update the given aggregate root's memory cache.
//         * @param aggregateRoot
//         * @return
//         */
//        public Future updateAggregateRootCache(IAggregateRoot aggregateRoot);
        
        /**
         * Accept the given aggregate root's changes.
         * @param aggregateRoot
         * @return
         */
        public Future acceptAggregateRootChanges(IAggregateRoot aggregateRoot);
        
        /**
         * 
         * @param aggregateRootTypeName
         * @param aggregateRootId
         * @return
         */
        public Future refreshAggregateFromEventStoreAsync(String aggregateRootTypeName, Object aggregateRootId);
        
        /**
         * Refresh the aggregate memory cache by replaying events of event store, and return the refreshed aggregate root.
         * @param aggregateRootType
         * @param aggregateRootId
         * @return
         */
        public Future refreshAggregateFromEventStoreAsync(Class aggregateRootType, Object aggregateRootId);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy