mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup old code
This commit is contained in:
+4
-15
@@ -101,7 +101,7 @@ public class FSRecords implements Forceable {
|
||||
}
|
||||
|
||||
private static class DbConnection {
|
||||
private static int refCount = 0;
|
||||
private static boolean ourInitialized;
|
||||
private static final TObjectIntHashMap<String> myAttributeIds = new TObjectIntHashMap<String>();
|
||||
|
||||
private static PersistentStringEnumerator myNames;
|
||||
@@ -114,17 +114,15 @@ public class FSRecords implements Forceable {
|
||||
private static ScheduledFuture<?> myFlushingFuture;
|
||||
private static boolean myCorrupted = false;
|
||||
|
||||
public static DbConnection connect() {
|
||||
public static void connect() {
|
||||
synchronized (lock) {
|
||||
if (refCount == 0) {
|
||||
if (!ourInitialized) {
|
||||
init();
|
||||
scanFreeRecords();
|
||||
setupFlushing();
|
||||
ourInitialized = true;
|
||||
}
|
||||
refCount++;
|
||||
}
|
||||
|
||||
return new DbConnection();
|
||||
}
|
||||
|
||||
private static void scanFreeRecords() {
|
||||
@@ -384,15 +382,6 @@ public class FSRecords implements Forceable {
|
||||
return myRecords;
|
||||
}
|
||||
|
||||
public static void dispose() throws IOException {
|
||||
synchronized (lock) {
|
||||
refCount--;
|
||||
if (refCount == 0) {
|
||||
closeFiles();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void closeFiles() throws IOException {
|
||||
if (myFlushingFuture != null) {
|
||||
myFlushingFuture.cancel(false);
|
||||
|
||||
Reference in New Issue
Block a user