/libcore/ojluni/src/main/java/java/lang/ref/ |
H A D | Reference.java | 58 final ReferenceQueue<? super T> queue; field in class:Reference 64 * before it has been removed from its queue, the queueNext field points 65 * to the next reference on the queue. The last reference on a queue 67 * reference queue, the queueNext field points to the 72 * internal to 'queue'. 118 * not registered with a queue when it was created, then this method will 126 // after this reference object has been removed from its queue 129 return queue != null && queue 154 Reference(T referent, ReferenceQueue<? super T> queue) argument [all...] |
/libcore/luni/src/test/java/libcore/java/lang/ref/ |
H A D | ReferenceQueueTest.java | 129 private void enqueueLater(final ReferenceQueue<Object> queue, int delayMillis) { argument 132 enqueue(queue); 137 private void enqueue(ReferenceQueue<Object> queue) { argument 138 new WeakReference<Object>(new Object(), queue).enqueue();
|
/libcore/ojluni/src/main/java/sun/util/locale/ |
H A D | LocaleObjectCache.java | 41 private ReferenceQueue<V> queue = new ReferenceQueue<>(); field in class:LocaleObjectCache 67 CacheEntry<K, V> newEntry = new CacheEntry<>(key, newVal, queue); 84 CacheEntry<K, V> entry = new CacheEntry<>(key, value, queue); 92 while ((entry = (CacheEntry<K, V>)queue.poll()) != null) { 106 CacheEntry(K key, V value, ReferenceQueue<V> queue) { argument 107 super(value, queue);
|
/libcore/luni/src/main/java/java/lang/ref/ |
H A D | FinalizerReference.java | 23 // This queue contains those objects eligible for finalization. 24 public static final ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); field in class:FinalizerReference 26 // Guards the list (not the queue). 54 FinalizerReference<?> reference = new FinalizerReference<Object>(referent, queue); 101 // and then put it on the queue so that it can be finalized. 108 // list. This is required instead of enqueuing directly on the finalizer queue 110 // yet on the finalizer queue. This could cause the sentinel to run before the
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/ |
H A D | ReferenceTest.java | 124 ReferenceQueue<Object> queue = new ReferenceQueue<Object>(); 126 r = newWeakReference(queue); 128 Reference ref = queue.remove(); 133 r = newWeakReference(queue); 136 // wait for the reference queue thread to enqueue the newly-finalized object 140 ref = queue.poll(); 231 private WeakReference<Object> newWeakReference(ReferenceQueue<Object> queue) { argument 233 WeakReference<Object> ref = new WeakReference<Object>(o, queue);
|
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/ |
H A D | AbstractQueueTest.java | 31 private MockAbstractQueue<Object> queue; field in class:AbstractQueueTest 113 queue.add(null); 127 queue.add(o); 131 queue.add(o); 145 queue.add(o); 148 queue.add(I); 149 assertTrue(queue.contains(I)); 150 Iterator iter = queue.iterator(); 162 queue.addAll(null); 175 queue [all...] |
/libcore/libart/src/main/java/java/lang/ |
H A D | Daemons.java | 31 * Calls Object.finalize() on objects in the finalizer reference queue. The VM 135 * pending list to the managed reference queue. 167 private final ReferenceQueue<Object> queue = FinalizerReference.queue; field in class:Daemons.FinalizerDaemon 195 FinalizerReference<?> finalizingReference = (FinalizerReference<?>)queue.poll(); 204 finalizingReference = (FinalizerReference<?>)queue.remove();
|
/libcore/ojluni/src/main/java/java/util/ |
H A D | Timer.java | 78 * it uses a binary heap to represent its task queue, so the cost to schedule 91 * The timer task queue. This data structure is shared with the timer 94 * and removing them from the queue when they're obsolete. 96 private final TaskQueue queue = new TaskQueue(); field in class:Timer 101 private final TimerThread thread = new TimerThread(queue); 106 * tasks in the timer queue. It is used in preference to a finalizer on 112 synchronized(queue) { 114 queue.notify(); // In case queue is empty. 395 synchronized(queue) { 497 private TaskQueue queue; field in class:TimerThread 499 TimerThread(TaskQueue queue) argument 578 private TimerTask[] queue = new TimerTask[128]; field in class:TaskQueue [all...] |
H A D | PriorityQueue.java | 31 * An unbounded priority {@linkplain Queue queue} based on a priority heap. 32 * The elements of the priority queue are ordered according to their 34 * provided at queue construction time, depending on which constructor is 35 * used. A priority queue does not permit {@code null} elements. 36 * A priority queue relying on natural ordering also does not permit 40 * <p>The <em>head</em> of this queue is the <em>least</em> element 43 * broken arbitrarily. The queue retrieval operations {@code poll}, 45 * element at the head of the queue. 47 * <p>A priority queue is unbounded, but has an internal 49 * elements on the queue 97 transient Object[] queue; // non-private to simplify nested class access field in class:PriorityQueue [all...] |
H A D | WeakHashMap.java | 177 * Reference queue for cleared WeakEntries 179 private final ReferenceQueue<Object> queue = new ReferenceQueue<>(); field in class:WeakHashMap 300 for (Object x; (x = queue.poll()) != null; ) { 301 synchronized (queue) { 446 tab[i] = new Entry<>(k, value, queue, h, e); 479 * If ignoring null elements and processing ref queue caused massive 632 // clear out ref queue. We don't need to expunge entries 634 while (queue.poll() != null) 643 // reference queue will make them eligible for reclamation. 644 while (queue 692 Entry(Object key, V value, ReferenceQueue<Object> queue, int hash, Entry<K,V> next) argument [all...] |
/libcore/ojluni/src/main/java/sun/net/www/http/ |
H A D | KeepAliveStream.java | 47 // has this KeepAliveStream been put on the queue for asynchronous cleanup. 50 private static final KeepAliveStreamCleaner queue = new KeepAliveStreamCleaner(); field in class:KeepAliveStream 92 //put this KeepAliveStream on the queue so that the data remaining 155 synchronized(queue) { 157 if (!queue.offer(kace)) { 163 queue.notifyAll(); 185 cleanerThread = new Thread(grp, queue, "Keep-Alive-SocketCleaner"); 196 } // queue
|
/libcore/ojluni/src/main/java/sun/nio/ch/ |
H A D | FileLockTable.java | 92 ReferenceQueue<FileLock> queue, 94 super(referent, queue); 109 // reference queue for cleared refs 110 private static ReferenceQueue<FileLock> queue = new ReferenceQueue<FileLock>(); field in class:SharedFileLockTable 137 list.add(new FileLockReference(fl, queue, fileKey)); 153 list.add(new FileLockReference(fl, queue, fileKey)); 161 // process any stale entries pending in the reference queue 240 list.set(index, new FileLockReference(toLock, queue, fileKey)); 259 // Process the reference queue 262 while ((ref = (FileLockReference)queue 91 FileLockReference(FileLock referent, ReferenceQueue<FileLock> queue, FileKey key) argument [all...] |
/libcore/ojluni/src/main/java/sun/misc/ |
H A D | SoftCache.java | 123 private ValueCell(Object key, Object value, ReferenceQueue queue) { argument 124 super(value, queue); 129 ReferenceQueue queue) 132 return new ValueCell(key, value, queue); 159 /* Reference queue for cleared ValueCells */ 160 private ReferenceQueue queue = new ReferenceQueue(); field in class:SoftCache 170 while ((vc = (ValueCell)queue.poll()) != null) { 291 hash.put(key, ValueCell.create(key, v, queue)); 314 ValueCell vc = ValueCell.create(key, value, queue); 349 Because it uses SoftCache.this.queue, thi 128 create(Object key, Object value, ReferenceQueue queue) argument [all...] |
/libcore/ojluni/src/main/java/sun/security/util/ |
H A D | Cache.java | 258 private final ReferenceQueue<V> queue; field in class:MemoryCache 268 this.queue = new ReferenceQueue<>(); 270 this.queue = null; 277 * Empty the reference queue and remove all corresponding entries 284 if (queue == null) { 290 CacheEntry<K,V> entry = (CacheEntry<K,V>)queue.poll(); 347 if (queue != null) { 353 while (queue.poll() != null) { 364 CacheEntry<K,V> newEntry = newEntry(key, value, expirationTime, queue); 460 long expirationTime, ReferenceQueue<V> queue) { 459 newEntry(K key, V value, long expirationTime, ReferenceQueue<V> queue) argument 522 SoftCacheEntry(K key, V value, long expirationTime, ReferenceQueue<V> queue) argument [all...] |
/libcore/luni/src/main/java/java/util/concurrent/ |
H A D | ConcurrentLinkedQueue.java | 25 * An unbounded thread-safe {@linkplain Queue queue} based on linked nodes. 26 * This queue orders elements FIFO (first-in-first-out). 27 * The <em>head</em> of the queue is that element that has been on the 28 * queue the longest time. 29 * The <em>tail</em> of the queue is that element that has been on the 30 * queue the shortest time. New elements 31 * are inserted at the tail of the queue, and the queue retrieval 32 * operations obtain elements at the head of the queue. 45 * reflecting the state of the queue a 788 final ConcurrentLinkedQueue<E> queue; field in class:ConcurrentLinkedQueue.CLQSpliterator 792 CLQSpliterator(ConcurrentLinkedQueue<E> queue) argument [all...] |
H A D | LinkedBlockingQueue.java | 25 * An optionally-bounded {@linkplain BlockingQueue blocking queue} based on 27 * This queue orders elements FIFO (first-in-first-out). 28 * The <em>head</em> of the queue is that element that has been on the 29 * queue the longest time. 30 * The <em>tail</em> of the queue is that element that has been on the 31 * queue the shortest time. New elements 32 * are inserted at the tail of the queue, and the queue retrieval 33 * operations obtain elements at the head of the queue. 38 * way to prevent excessive queue expansio 802 final LinkedBlockingQueue<E> queue; field in class:LinkedBlockingQueue.LBQSpliterator 807 LBQSpliterator(LinkedBlockingQueue<E> queue) argument [all...] |
H A D | PriorityBlockingQueue.java | 28 * An unbounded {@linkplain BlockingQueue blocking queue} that uses 30 * blocking retrieval operations. While this queue is logically 33 * {@code null} elements. A priority queue relying on {@linkplain 77 * @param <E> the type of elements held in this queue 114 * Priority queue represented as a balanced binary heap: the two 115 * children of queue[n] are queue[2*n+1] and queue[2*(n+1)]. The 116 * priority queue is ordered by comparator, or by the elements' 119 * lowest value is in queue[ 121 private transient Object[] queue; field in class:PriorityBlockingQueue 907 final PriorityBlockingQueue<E> queue; field in class:PriorityBlockingQueue.PBQSpliterator 912 PBQSpliterator(PriorityBlockingQueue<E> queue, Object[] array, int index, int fence) argument [all...] |
H A D | ConcurrentLinkedDeque.java | 1413 final ConcurrentLinkedDeque<E> queue; field in class:ConcurrentLinkedDeque.CLDSpliterator 1417 CLDSpliterator(ConcurrentLinkedDeque<E> queue) { argument 1418 this.queue = queue; 1423 final ConcurrentLinkedDeque<E> q = this.queue; 1456 final ConcurrentLinkedDeque<E> q = this.queue; 1473 final ConcurrentLinkedDeque<E> q = this.queue;
|
H A D | LinkedBlockingDeque.java | 633 * Retrieves and removes the head of the queue represented by this deque. 639 * @return the head of the queue represented by this deque 659 * Retrieves, but does not remove, the head of the queue represented by 665 * @return the head of the queue represented by this deque 818 // * queue. Attempts to addAll of a queue to itself result in 823 // * @param c collection containing elements to be added to this queue 824 // * @return {@code true} if this queue changed as a result of the call 1103 final LinkedBlockingDeque<E> queue; field in class:LinkedBlockingDeque.LBDSpliterator 1108 LBDSpliterator(LinkedBlockingDeque<E> queue) { argument [all...] |
H A D | ScheduledThreadPoolExecutor.java | 42 * automatically removed from the work queue until its delay elapses. 57 * {@code corePoolSize} threads and an unbounded queue, adjustments 113 * 2. Using a custom queue (DelayedWorkQueue), a variant of 142 * True if ScheduledFutureTask.cancel should remove from queue. 173 * Index into delay queue, to support faster cancellation. 294 * is shut down, rejects the task. Otherwise adds task to queue 334 * Cancels and clears the queue of all tasks that should not be run 455 * because the thread bounds and queue capacities are reached 475 * because the thread bounds and queue capacities are reached 504 * Constrains the values of all delays in the queue t 847 private RunnableScheduledFuture<?>[] queue = field in class:ScheduledThreadPoolExecutor.DelayedWorkQueue [all...] |
/libcore/ojluni/src/main/java/java/io/ |
H A D | ObjectStreamClass.java | 93 /** queue for WeakReferences to local classes */ 96 /** queue for WeakReferences to field reflectors keys */ 2180 ReferenceQueue<Class<?>> queue) 2182 super(cl, queue); 2299 * on the specified reference queue. 2301 static void processQueue(ReferenceQueue<Class<?>> queue, argument 2306 while((ref = queue.poll()) != null) { 2324 * with a queue. 2179 FieldReflectorKey(Class<?> cl, ObjectStreamField[] fields, ReferenceQueue<Class<?>> queue) argument
|
/libcore/ojluni/src/main/java/java/lang/ |
H A D | Thread.java | 1634 /** queue for WeakReferences to audited subclasses */ 1951 * on the specified reference queue. 1953 static void processQueue(ReferenceQueue<Class<?>> queue, argument 1958 while((ref = queue.poll()) != null) { 1975 * with a queue.
|