Searched defs:sync (Results 1 - 16 of 16) sorted by relevance

/libcore/ojluni/src/main/java/java/io/
H A DFileDescriptor.java108 * system, sync will not return until all in-memory modified copies
112 * sync is meant to be used by code that requires physical
115 * might use sync to ensure that all changes to a file caused
118 * sync only affects buffers downstream of this FileDescriptor. If
122 * OutputStream.flush) before that data will be affected by sync.
130 public native void sync() throws SyncFailedException; method in class:FileDescriptor
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DTimerTaskTest.java30 private final Object sync = new Object(); field in class:TimerTaskTest.TimerTestTask
53 synchronized (sync) {
54 sync.notify();
184 synchronized (testTask.sync) {
186 testTask.sync.wait(500);
206 synchronized (testTask.sync) {
208 testTask.sync.wait(500);
H A DTimerTest.java35 private final Object sync = new Object(); field in class:TimerTest
80 synchronized (sync) {
81 sync.notify();
222 synchronized (sync) {
223 sync.wait(500);
236 synchronized (sync) {
237 sync.wait(500);
249 synchronized (sync) {
250 sync.wait(200);
252 sync
[all...]
/libcore/luni/src/main/java/java/util/concurrent/
H A DCountDownLatch.java161 private final Sync sync; field in class:CountDownLatch
172 this.sync = new Sync(count);
203 sync.acquireSharedInterruptibly(1);
249 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
263 sync.releaseShared(1);
274 return sync.getCount();
285 return super.toString() + "[Count = " + sync.getCount() + "]";
H A DSemaphore.java136 private final Sync sync; field in class:Semaphore
242 sync = new NonfairSync(permits);
257 sync = fair ? new FairSync(permits) : new NonfairSync(permits);
289 sync.acquireSharedInterruptibly(1);
312 sync.acquireShared(1);
340 return sync.nonfairTryAcquireShared(1) >= 0;
386 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
403 sync.releaseShared(1);
446 sync.acquireSharedInterruptibly(permits);
475 sync
[all...]
/libcore/luni/src/main/java/java/util/concurrent/locks/
H A DReentrantLock.java82 private final Sync sync; field in class:ReentrantLock
234 sync = new NonfairSync();
244 sync = fair ? new FairSync() : new NonfairSync();
262 sync.lock();
312 sync.acquireInterruptibly(1);
342 return sync.nonfairTryAcquire(1);
419 return sync.tryAcquireNanos(1, unit.toNanos(timeout));
434 sync.release(1);
477 return sync.newCondition();
510 return sync
[all...]
H A DReentrantReadWriteLock.java196 final Sync sync; field in class:ReentrantReadWriteLock
213 sync = fair ? new FairSync() : new NonfairSync();
677 private final Sync sync; field in class:ReentrantReadWriteLock.ReadLock
686 sync = lock.sync;
700 sync.acquireShared(1);
745 sync.acquireSharedInterruptibly(1);
772 return sync.tryReadLock();
844 return sync.tryAcquireSharedNanos(1, unit.toNanos(timeout));
859 sync
891 private final Sync sync; field in class:ReentrantReadWriteLock.WriteLock
[all...]
H A DAbstractQueuedLongSynchronizer.java39 To keep sources in sync, the remainder of this source file is
41 name and changing ints related with sync state to longs. Please
1152 * a condition queue, is now waiting to reacquire on sync queue.
1173 * Returns true if node is on sync queue by searching backwards from tail.
1191 * Transfers a node from a condition queue onto sync queue.
1218 * Transfers node, if necessary, to sync queue after a cancelled wait.
1244 * @return previous sync state
1718 final boolean isOwnedBy(AbstractQueuedLongSynchronizer sync) { argument
1719 return sync == AbstractQueuedLongSynchronizer.this;
H A DAbstractQueuedSynchronizer.java210 * // The sync object does all the hard work. We just forward to it.
211 * private final Sync sync = new Sync();
213 * public void lock() { sync.acquire(1); }
214 * public boolean tryLock() { return sync.tryAcquire(1); }
215 * public void unlock() { sync.release(1); }
216 * public Condition newCondition() { return sync.newCondition(); }
217 * public boolean isLocked() { return sync.isHeldExclusively(); }
218 * public boolean hasQueuedThreads() { return sync.hasQueuedThreads(); }
220 * sync.acquireInterruptibly(1);
224 * return sync
2187 isOwnedBy(AbstractQueuedSynchronizer sync) argument
[all...]
/libcore/ojluni/src/main/java/java/util/prefs/
H A DPreferences.java1015 * @see #sync()
1022 * store (from any VM) prior to the <tt>sync</tt> invocation. As a
1034 public abstract void sync() throws BackingStoreException; method in class:Preferences
H A DAbstractPreferences.java76 * {@link Preferences#sync()}. Generally speaking, these SPI methods should not
82 * of <tt>flush()</tt> and <tt>sync</tt> should return <tt>false</tt>, as
1270 * Implements the <tt>sync</tt> method as per the specification in
1271 * {@link Preferences#sync()}.
1289 public void sync() throws BackingStoreException { method in class:AbstractPreferences
1316 * sync(), rather than merely overriding this method.
1319 * will propagate out beyond the enclosing {@link #sync()} invocation.
H A DFileSystemPreferences.java45 * (The file lock is obtained only for sync(), flush() and removeNode().)
268 * the sync operation, changes are first saved into this file, and then
313 * corresponding disk file (prefsFile) by the sync operation. The initial
347 * is sync'ed by overwriting our prefsCache with the preference map last
402 * next sync.
481 // These 2 things guarantee node will get wrtten at next flush/sync
514 // These 2 things guarantee node will get wrtten at next flush/sync
716 public synchronized void sync() throws BackingStoreException { method in class:FileSystemPreferences
746 super.sync();
779 // playback any local mods since last sync
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/prefs/
H A DPreferencesTest.java411 public void sync() throws BackingStoreException { method in class:PreferencesTest.MockPreferences
/libcore/jsr166-tests/src/test/java/jsr166/
H A DAbstractQueuedLongSynchronizerTest.java112 final Mutex sync; field in class:AbstractQueuedLongSynchronizerTest.InterruptibleSyncRunnable
113 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } argument
115 sync.acquireInterruptibly();
124 final Mutex sync; field in class:AbstractQueuedLongSynchronizerTest.InterruptedSyncRunnable
125 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } argument
127 sync
137 waitForQueuedThread(AbstractQueuedLongSynchronizer sync, Thread t) argument
151 assertHasQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument
165 assertHasExclusiveQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument
177 assertHasSharedQueuedThreads(AbstractQueuedLongSynchronizer sync, Thread... expected) argument
190 assertHasWaitersUnlocked(Mutex sync, ConditionObject c, Thread... threads) argument
200 assertHasWaitersLocked(Mutex sync, ConditionObject c, Thread... threads) argument
[all...]
H A DAbstractQueuedSynchronizerTest.java116 final Mutex sync; field in class:AbstractQueuedSynchronizerTest.InterruptibleSyncRunnable
117 InterruptibleSyncRunnable(Mutex sync) { this.sync = sync; } argument
119 sync.acquireInterruptibly();
128 final Mutex sync; field in class:AbstractQueuedSynchronizerTest.InterruptedSyncRunnable
129 InterruptedSyncRunnable(Mutex sync) { this.sync = sync; } argument
131 sync
141 waitForQueuedThread(AbstractQueuedSynchronizer sync, Thread t) argument
154 assertHasQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument
168 assertHasExclusiveQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument
180 assertHasSharedQueuedThreads(AbstractQueuedSynchronizer sync, Thread... expected) argument
193 assertHasWaitersUnlocked(Mutex sync, ConditionObject c, Thread... threads) argument
203 assertHasWaitersLocked(Mutex sync, ConditionObject c, Thread... threads) argument
[all...]
/libcore/luni/src/test/java/libcore/java/util/prefs/
H A DOldPreferencesTest.java109 p.sync();
1110 public void sync() throws BackingStoreException { method in class:OldPreferencesTest.MockPreferences

Completed in 699 milliseconds