Issue #273: Fixed issues based on review remarks
This commit is contained in:
parent
37cfa4b295
commit
6418a6c2b6
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
/**
|
||||
*
|
||||
@ -37,6 +37,23 @@ package main.java.com.wssia.caching;
|
||||
*/
|
||||
public class App {
|
||||
|
||||
/**
|
||||
* Program entry point
|
||||
*
|
||||
* @param args command line args
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
AppManager.initDB(false); // VirtualDB (instead of MongoDB) was used in running the JUnit tests
|
||||
// and the App class to avoid Maven compilation errors. Set flag to
|
||||
// true to run the tests with MongoDB (provided that MongoDB is
|
||||
// installed and socket connection is open).
|
||||
AppManager.initCacheCapacity(3);
|
||||
App app = new App();
|
||||
app.useReadAndWriteThroughStrategy();
|
||||
app.useReadThroughAndWriteAroundStrategy();
|
||||
app.useReadThroughAndWriteBehindStrategy();
|
||||
}
|
||||
|
||||
/**
|
||||
* Read-through and write-through
|
||||
*/
|
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
import java.text.ParseException;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
/**
|
||||
*
|
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.util.HashMap;
|
||||
@ -12,13 +12,16 @@ import com.mongodb.client.model.UpdateOptions;
|
||||
|
||||
/**
|
||||
*
|
||||
* <p>
|
||||
* DBManager handles the communication with the underlying data store i.e. Database. It contains the
|
||||
* implemented methods for querying, inserting, and updating data. MongoDB was used as the database
|
||||
* for the application.
|
||||
*
|
||||
* </p>
|
||||
* <p>
|
||||
* Developer/Tester is able to choose whether the application should use MongoDB as its underlying
|
||||
* data storage (connect()) or a simple Java data structure to (temporarily) store the data/objects
|
||||
* during runtime (createVirtualDB()).
|
||||
* </p>
|
||||
*/
|
||||
public class DBManager {
|
||||
|
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
@ -1,4 +1,4 @@
|
||||
package main.java.com.wssia.caching;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
/**
|
||||
*
|
@ -1,7 +1,4 @@
|
||||
package test.java.com.wssia.caching;
|
||||
|
||||
import main.java.com.wssia.caching.App;
|
||||
import main.java.com.wssia.caching.AppManager;
|
||||
package com.iluwatar.caching;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
Loading…
x
Reference in New Issue
Block a user