java.lang.Object
org.fuin.ddd4j.ddd.AggregateNoCache<AGGREGATE>
- Type Parameters:
AGGREGATE- Type of the aggregate.
- All Implemented Interfaces:
AggregateCache<AGGREGATE>
Never caches anything.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal AGGREGATEget(AggregateRootId aggregateId, Integer version) Tries to read the aggregate with the given identifier from the cache.voidput(AggregateRootId aggregateId, AGGREGATE aggregate) Puts an aggregate with the given identifier in the cache.final voidremove(AggregateRootId aggregateId) Removes the aggregate with the given identifier from the cache.
-
Constructor Details
-
AggregateNoCache
public AggregateNoCache()
-
-
Method Details
-
get
Description copied from interface:AggregateCacheTries to read the aggregate with the given identifier from the cache.- Specified by:
getin interfaceAggregateCache<AGGREGATE>- Parameters:
aggregateId- Aggregate to load.version- Version to load ornullfor latest.- Returns:
- Cached aggregate or
nullif it was not found in the cache.
-
put
Description copied from interface:AggregateCachePuts an aggregate with the given identifier in the cache.- Specified by:
putin interfaceAggregateCache<AGGREGATE>- Parameters:
aggregateId- Aggregate to load.aggregate- Aggregate to cache.
-
remove
Description copied from interface:AggregateCacheRemoves the aggregate with the given identifier from the cache.- Specified by:
removein interfaceAggregateCache<AGGREGATE>- Parameters:
aggregateId- Aggregate to remove from cache.
-