FileCache { @NonNull public static FileCache withInterProcessLocking(@NonNull File cacheDirectory) { return new FileCache(cacheDirectory, true); } private  FileCache(); private  FileCache(@NonNull File cacheDirectory, boolean interProcessLocking); @NonNull static FileCache withInterProcessLocking(@NonNull File cacheDirectory); @NonNull static FileCache withSingleProcessLocking(@NonNull File cacheDirectory); boolean getOrCreateFile(
            @NonNull File outputFile,
            @NonNull Inputs inputs,
            @NonNull IOExceptionFunction<File, Void> fileProducer); @Override String toString(); static final FileCache NO_CACHE; }
@Test public void testMultiThreadsWithInterProcessLockingEnabled() throws IOException { testMultiThreadsWithSameInputDifferentOutputs( FileCache.withInterProcessLocking(cacheFolder.getRoot())); testMultiThreadsWithDifferentInputsDifferentOutputs( FileCache.withInterProcessLocking(cacheFolder.getRoot())); }