mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Merge remote-tracking branch 'origin/NewDatastore' into NewDatastore
This commit is contained in:
commit
a620f52dce
1 changed files with 12 additions and 0 deletions
|
@ -65,4 +65,16 @@ public class NewOwnerStore {
|
||||||
System.out.println("Consistency Violation! \n” + “i = ” + i + “\n\t expected = " +
|
System.out.println("Consistency Violation! \n” + “i = ” + i + “\n\t expected = " +
|
||||||
expected.toString() + "\n\t actual = " + actual.toString());
|
expected.toString() + "\n\t actual = " + actual.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void save(Owner owner){
|
||||||
|
//actual write to datastore
|
||||||
|
owners.save(owner);
|
||||||
|
//shadow write to new datastore
|
||||||
|
ownerStore.put(owner.getId(), convertToStaticOwner(owner));
|
||||||
|
}
|
||||||
|
|
||||||
|
//this is for testing to introduce inconsistencies
|
||||||
|
public void testPutInOldDatastoreOnly(Owner owner){
|
||||||
|
owners.save(owner);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue