@Test public void testCollisionDifferentThread() throws Exception { final String diskStorePath = getTempDir("testCollisionDifferentThread"); dspm1 = new DiskStorePathManager(diskStorePath); dspm1.getFile("foo"); Thread newThread = new Thread() { @Override public void run() { dspm2 = new DiskStorePathManager(diskStorePath); dspm2.getFile("foo"); } }; newThread.start(); newThread.join(10 * 1000L); Assert.assertFalse(getDiskStorePath(dspm1).equals(getDiskStorePath(dspm2))); }
public File getFile(String cacheName, String suffix) { return getFile(safeName(cacheName) + suffix); }
DiskStorePathManager { public File getFile(String cacheName, String suffix) { return getFile(safeName(cacheName) + suffix); } }
DiskStorePathManager { public File getFile(String cacheName, String suffix) { return getFile(safeName(cacheName) + suffix); } DiskStorePathManager(String initialPath);  DiskStorePathManager(); }
DiskStorePathManager { public File getFile(String cacheName, String suffix) { return getFile(safeName(cacheName) + suffix); } DiskStorePathManager(String initialPath);  DiskStorePathManager(); boolean resolveAndLockIfExists(String file); boolean isAutoCreated(); boolean isDefault(); synchronized void releaseLock(); File getFile(String cacheName, String suffix); File getFile(String name); }
DiskStorePathManager { public File getFile(String cacheName, String suffix) { return getFile(safeName(cacheName) + suffix); } DiskStorePathManager(String initialPath);  DiskStorePathManager(); boolean resolveAndLockIfExists(String file); boolean isAutoCreated(); boolean isDefault(); synchronized void releaseLock(); File getFile(String cacheName, String suffix); File getFile(String name);  }