Lines Matching refs:file
5 * you may not use this file except in compliance with the License.
25 * This class provides a shared file to several threads. Only one thread
26 * at a time can use the file. To acquire the file a thread has to
29 * when another one wants to acquire the file. In case a release is requested
30 * the thread owning the file must release it as soon as possible. If no
31 * callback is provided a thread that acquires the file must release it
33 * have the file for less time.
49 public void onReleaseRequested(File file);
52 public MutexFileProvider(File file) throws IOException {
53 mFile = file;
54 if (file.exists()) {
55 file.delete();
57 file.createNewFile();
62 // If this thread has the file, nothing to do.
67 // Another thread wants file ask for a release.
72 // Wait until the file is released.
86 Log.i(LOG_TAG, "Acquired file: " + mFile + " by thread: " + mOwnerThread);
100 Log.i(LOG_TAG, "Released file: " + mFile + " from thread: " + mOwnerThread);