diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index 265950261..2446de4c1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -242,7 +242,16 @@ public static final class FileStoreAttributes { private static Map locks = new ConcurrentHashMap<>(); - private static void setBackground(boolean async) { + /** + * Whether FileStore attributes should be determined asynchronously + * + * @param async + * whether FileStore attributes should be determined + * asynchronously. If false access to cached attributes may block + * for some seconds for the first call per FileStore + * @since 5.6.2 + */ + public static void setBackground(boolean async) { background.set(async); } @@ -709,7 +718,9 @@ public static FS detect() { * asynchronously. If false access to cached attributes may block * for some seconds for the first call per FileStore * @since 5.1.9 + * @deprecated Use {@link FileStoreAttributes#setBackground} instead */ + @Deprecated public static void setAsyncFileStoreAttributes(boolean asynch) { FileStoreAttributes.setBackground(asynch); }