Skip to content
This repository was archived by the owner on Mar 14, 2025. It is now read-only.

Commit 3300492

Browse files
committed
closes #4
adding additional javadoc (e.g. reasoning for locking scheme)
1 parent d394878 commit 3300492

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/main/java/org/cryptomator/cloudaccess/localfs/LocalFsCloudProvider.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,22 @@
4141
import java.util.concurrent.locks.ReadWriteLock;
4242
import java.util.concurrent.locks.ReentrantReadWriteLock;
4343

44+
/**
45+
* CloudProvider implementation to mirror a folder in the local filesystem.
46+
* <p>
47+
* This class is mainly for testing purposes and therefore aims for correctness, not performance.
48+
* All filesystem altering operations (create, delete, move and write) will be executed exclusively and blocking,
49+
* while all fs quering operations are performed simultanously.
50+
*/
4451
public class LocalFsCloudProvider implements CloudProvider {
4552

4653
private static final CloudPath ABS_ROOT = CloudPath.of("/");
4754

4855
private final Path root;
56+
57+
/**
58+
* Lock to ensure that any operation always performed on a consistent filesystem, i.e. no pending fs-altering operation exists.
59+
*/
4960
private final ReadWriteLock lock;
5061

5162
public LocalFsCloudProvider(Path root) {

0 commit comments

Comments
 (0)