mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-21 12:25:45 +00:00
deps: Refactor dependencies (#3224)
* remove spring dep move junit, logging, mockito under dep mgmt * upgrade anti-corruption-layer deps * async method invocation * balking, bloc * bridge to bytecode * caching * callback - cqrs * component - health check * hexagonal - metadata mapping * rest of the patterns * remove checkstyle, take spotless into use
This commit is contained in:
@@ -27,12 +27,12 @@ package com.iluwatar.identitymap;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* The basic idea behind the Identity Map is to have a series of maps containing objects that have been pulled from the database.
|
||||
* The below example demonstrates the identity map pattern by creating a sample DB.
|
||||
* Since only 1 DB has been created we only have 1 map corresponding to it for the purpose of this demo.
|
||||
* When you load an object from the database, you first check the map.
|
||||
* If there’s an object in it that corresponds to the one you’re loading, you return it. If not, you go to the database,
|
||||
* putting the objects on the map for future reference as you load them.
|
||||
* The basic idea behind the Identity Map is to have a series of maps containing objects that have
|
||||
* been pulled from the database. The below example demonstrates the identity map pattern by
|
||||
* creating a sample DB. Since only 1 DB has been created we only have 1 map corresponding to it for
|
||||
* the purpose of this demo. When you load an object from the database, you first check the map. If
|
||||
* there’s an object in it that corresponds to the one you’re loading, you return it. If not, you go
|
||||
* to the database, putting the objects on the map for future reference as you load them.
|
||||
*/
|
||||
@Slf4j
|
||||
public class App {
|
||||
|
||||
Reference in New Issue
Block a user