MCPcopy Create free account
hub / github.com/M66B/FairEmail / CopyLock

Method CopyLock

app/src/main/java/androidx/room/CopyLock.java:69–73  ·  view source on GitHub ↗

Creates a lock with name and using lockDir as the directory for the lock files. @param name the name of this lock. @param lockDir the directory where the lock files will be located. @param processLock whether to use file for process level locking or not.

(@NonNull String name, @NonNull File lockDir, boolean processLock)

Source from the content-addressed store, hash-verified

67 * @param processLock whether to use file for process level locking or not.
68 */
69 public CopyLock(@NonNull String name, @NonNull File lockDir, boolean processLock) {
70 mCopyLockFile = new File(lockDir, name + ".lck");
71 mThreadLock = getThreadLock(mCopyLockFile.getAbsolutePath());
72 mFileLevelLock = processLock;
73 }
74
75 /**
76 * Attempts to grab the lock, blocking if already held by another thread or process.

Callers

nothing calls this directly

Calls 1

getThreadLockMethod · 0.95

Tested by

no test coverage detected