import org.simantics.acorn.exception.AcornAccessVerificationException;
import org.simantics.acorn.exception.IllegalAcornStateException;
import org.simantics.utils.datastructures.Pair;
+import org.slf4j.Logger;
public abstract class LRUObject<MapKey, MapValue extends LRUObject<MapKey, MapValue>> implements Persistable {
-
+
+ public abstract Logger getLogger();
public static boolean VERIFY = true;
// Final stuff
public void acquireMutex() throws IllegalAcornStateException {
try {
while(!mutex.tryAcquire(3, TimeUnit.SECONDS)) {
- System.err.println("Mutex is taking a long time to acquire - owner is " + mutexOwner);
+ getLogger().info("Mutex is taking a long time to acquire - owner is " + mutexOwner);
}
if(VERIFY)
if(VERIFY) verifyAccess();
return readDirectory;
}
+
+ public void moveTo(Path path) {
+ readDirectory = path;
+ }
}
\ No newline at end of file