mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
ability to hook into dropMemoryCaches
This commit is contained in:
@@ -266,16 +266,20 @@ public class PersistentHashMap<Key, Value> extends PersistentEnumeratorDelegate<
|
||||
((int)(myLiveAndGarbageKeysCounter & DEAD_KEY_NUMBER_MASK)) > 0;
|
||||
}
|
||||
|
||||
public void dropMemoryCaches() {
|
||||
public final void dropMemoryCaches() {
|
||||
if(myDoTrace) LOG.info("Drop memory caches " + myStorageFile);
|
||||
synchronized (myEnumerator) {
|
||||
myEnumerator.lockStorage();
|
||||
try {
|
||||
clearAppenderCaches();
|
||||
}
|
||||
finally {
|
||||
myEnumerator.unlockStorage();
|
||||
}
|
||||
doDropMemoryCaches();
|
||||
}
|
||||
}
|
||||
|
||||
protected void doDropMemoryCaches() {
|
||||
myEnumerator.lockStorage();
|
||||
try {
|
||||
clearAppenderCaches();
|
||||
}
|
||||
finally {
|
||||
myEnumerator.unlockStorage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user