Added recovery to start of application
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
@ -107,7 +107,7 @@ public class PersistenceManager {
|
|||||||
/**
|
/**
|
||||||
* Performs the recovery actions.
|
* Performs the recovery actions.
|
||||||
*/
|
*/
|
||||||
public synchronized void recovery() {
|
synchronized void recovery() {
|
||||||
try {
|
try {
|
||||||
BufferedReader reader = new BufferedReader(new FileReader(_dataPath + "log.txt"));
|
BufferedReader reader = new BufferedReader(new FileReader(_dataPath + "log.txt"));
|
||||||
String line;
|
String line;
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
*/
|
*/
|
||||||
public class ThreadCreator {
|
public class ThreadCreator {
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
PersistenceManager.getInstance().recovery();
|
||||||
Thread t1 = new ClientThread(1, 1, 10);
|
Thread t1 = new ClientThread(1, 1, 10);
|
||||||
Thread t2 = new ClientThread(2, 11, 20);
|
Thread t2 = new ClientThread(2, 11, 20);
|
||||||
Thread t3 = new ClientThread(3, 21, 30);
|
Thread t3 = new ClientThread(3, 21, 30);
|
||||||
|
|||||||
Reference in New Issue
Block a user