Home
last modified time | relevance | path

Searched refs:lockScope (Results 1 – 9 of 9) sorted by relevance

/external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/file/common/
DLockScopeTest.java52 LockScope lockScope = LockScope.createWithExistingThreadLocks(lockMap); in createWithSharedThreadLocks_sharesThreadLocksAcrossInstances() local
56 try (Lock lock = lockScope.threadLock(uri)) { in createWithSharedThreadLocks_sharesThreadLocksAcrossInstances()
65 LockScope lockScope = LockScope.createWithFailingThreadLocks(); in createWithFailingThreadLocks_willFailToAcquireThreadLocks() local
68 assertThrows(UnsupportedFileStorageOperation.class, () -> lockScope.threadLock(uri)); in createWithFailingThreadLocks_willFailToAcquireThreadLocks()
69 assertThat(lockScope.tryThreadLock(uri)).isNull(); in createWithFailingThreadLocks_willFailToAcquireThreadLocks()
74 LockScope lockScope = LockScope.create(); in createFileLockSucceedsInSingleProcess() local
78 Lock lock = lockScope.fileLock(stream.getChannel(), /* shared= */ false)) { in createFileLockSucceedsInSingleProcess()
/external/mobile-data-download/javatests/com/google/android/libraries/mobiledatadownload/file/backends/
DJavaFileBackendTest.java85 assertThat(backend.lockScope()).isNotNull(); in lockScope_returnsNonNullLockScope()
90 LockScope lockScope = new LockScope(); in lockScope_canBeOverridden() local
91 backend = new JavaFileBackend(lockScope); in lockScope_canBeOverridden()
92 assertThat(backend.lockScope()).isSameInstanceAs(lockScope); in lockScope_canBeOverridden()
DAndroidFileBackendTest.java332 assertThat(backend.lockScope()).isNotNull(); in lockScope_returnsNonNullLockScope()
337 LockScope lockScope = new LockScope(); in lockScope_canBeOverridden() local
339 AndroidFileBackend.builder(context).setLockScope(lockScope).build(); in lockScope_canBeOverridden()
340 assertThat(backend.lockScope()).isSameInstanceAs(lockScope); in lockScope_canBeOverridden()
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/backends/
DJavaFileBackend.java38 private final LockScope lockScope; field in JavaFileBackend
49 public JavaFileBackend(LockScope lockScope) { in JavaFileBackend() argument
50 this.lockScope = lockScope; in JavaFileBackend()
178 public LockScope lockScope() throws IOException { in lockScope() method in JavaFileBackend
179 return lockScope; in lockScope()
DAndroidFileBackend.java84 private LockScope lockScope = new LockScope(); field in AndroidFileBackend.Builder
118 public Builder setLockScope(LockScope lockScope) { in setLockScope() argument
124 this.lockScope = lockScope; in setLockScope()
134 backend = builder.backend != null ? builder.backend : new JavaFileBackend(builder.lockScope); in AndroidFileBackend()
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/openers/
DLockFileOpener.java143 return openContext.backend().lockScope().tryThreadLock(lockUri); in openThreadLock()
145 return openContext.backend().lockScope().threadLock(lockUri); in openThreadLock()
168 return openContext.backend().lockScope().tryFileLock(channel, shared); in openFileLock()
170 return openContext.backend().lockScope().fileLock(channel, shared); in openFileLock()
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/spi/
DForwardingBackend.java130 public LockScope lockScope() throws IOException { in lockScope() method in ForwardingBackend
131 return delegate().lockScope(); in lockScope()
DBackend.java189 default LockScope lockScope() throws IOException { in lockScope() method
/external/mobile-data-download/java/com/google/android/libraries/mobiledatadownload/file/common/testing/
DFakeFileBackend.java264 public LockScope lockScope() throws IOException { in lockScope() method in FakeFileBackend
265 return delegate.lockScope(); in lockScope()