diff options
Diffstat (limited to 'client/trunk/src/com/fourisland/instadisc/Database/CloseEntityStoreThread.java')
| -rw-r--r-- | client/trunk/src/com/fourisland/instadisc/Database/CloseEntityStoreThread.java | 33 |
1 files changed, 33 insertions, 0 deletions
| diff --git a/client/trunk/src/com/fourisland/instadisc/Database/CloseEntityStoreThread.java b/client/trunk/src/com/fourisland/instadisc/Database/CloseEntityStoreThread.java new file mode 100644 index 0000000..14ed006 --- /dev/null +++ b/client/trunk/src/com/fourisland/instadisc/Database/CloseEntityStoreThread.java | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | * To change this template, choose Tools | Templates | ||
| 3 | * and open the template in the editor. | ||
| 4 | */ | ||
| 5 | |||
| 6 | package com.fourisland.instadisc.Database; | ||
| 7 | |||
| 8 | import com.sleepycat.je.DatabaseException; | ||
| 9 | import com.sleepycat.persist.EntityStore; | ||
| 10 | import java.util.logging.Level; | ||
| 11 | import java.util.logging.Logger; | ||
| 12 | |||
| 13 | /** | ||
| 14 | * | ||
| 15 | * @author hatkirby | ||
| 16 | */ | ||
| 17 | public class CloseEntityStoreThread implements Runnable { | ||
| 18 | |||
| 19 | EntityStore es; | ||
| 20 | |||
| 21 | public CloseEntityStoreThread(EntityStore es) { | ||
| 22 | this.es = es; | ||
| 23 | } | ||
| 24 | |||
| 25 | public void run() { | ||
| 26 | try { | ||
| 27 | es.close(); | ||
| 28 | } catch (DatabaseException ex) { | ||
| 29 | Logger.getLogger(CloseEntityStoreThread.class.getName()).log(Level.SEVERE, null, ex); | ||
| 30 | } | ||
| 31 | } | ||
| 32 | |||
| 33 | } | ||
