Revision 46214 trunk/org.gvsig.desktop/org.gvsig.desktop.plugin/org.gvsig.h2spatial/org.gvsig.h2spatial.h2gis132/org.gvsig.h2spatial.h2gis132.provider/src/main/java/org/gvsig/fmap/dal/impl/LargeSetImpl.java
LargeSetImpl.java | ||
---|---|---|
9 | 9 |
import java.util.Collection; |
10 | 10 |
import java.util.Iterator; |
11 | 11 |
import java.util.Set; |
12 |
import org.apache.commons.io.FileUtils; |
|
12 | 13 |
import org.gvsig.fmap.dal.DALLocator; |
13 | 14 |
import org.gvsig.fmap.dal.DataManager; |
14 | 15 |
import org.gvsig.tools.ToolsLocator; |
... | ... | |
34 | 35 |
|
35 | 36 |
protected static final Logger LOGGER = LoggerFactory.getLogger(LargeSetImpl.class); |
36 | 37 |
|
38 |
private final File f; |
|
37 | 39 |
private MVStore mvstore; |
38 | 40 |
private MVMap<K, Boolean> mvMap; |
39 | 41 |
|
40 | 42 |
public LargeSetImpl() { |
41 | 43 |
super(); |
42 | 44 |
FoldersManager folderManager = ToolsLocator.getFoldersManager(); |
43 |
File f = folderManager.getUniqueTemporaryFile("MinLargeSet.mv");
|
|
45 |
this.f = folderManager.getUniqueTemporaryFile("MinLargeSet.mv");
|
|
44 | 46 |
this.mvstore = MVStore.open(f.getAbsolutePath()); |
45 | 47 |
this.mvMap = mvstore.openMap("DefaultMap"); |
46 | 48 |
} |
47 | 49 |
|
48 | 50 |
@Override |
49 | 51 |
protected void doDispose() throws BaseException { |
50 |
this.mvstore.close(); |
|
52 |
this.mvstore.closeImmediately();
|
|
51 | 53 |
this.mvMap = null; |
52 | 54 |
this.mvstore = null; |
55 |
FileUtils.deleteQuietly(f); |
|
53 | 56 |
} |
54 | 57 |
|
55 | 58 |
@Override |
Also available in: Unified diff