queue « concurrency « Java Thread Q&A

Home
Java Thread Q&A
1.concurrency
2.Development
3.Exception
4.Notify
5.Operation
6.Socket
7.State
8.synchronize
9.Thread Safe
10.ThreadPool
Java Thread Q&A » concurrency » queue 

1. swappable work queue    stackoverflow.com

There's a name for this, but I don't know what it is so it's hard to google. What I'm looking for is something in the java concurrency utilities, which is a pair ...

2. concurrent queue - general question (description and usage)    stackoverflow.com

I am having some trouble grasping the idea of a concurrent queue. I understand a queue is a FIFO, or first come first serve, data structure. Now when we add the concurrency ...

3. size of ConcurrentLinkedQueue    stackoverflow.com

Reading Java's ConcurrentLinkedQueue Docs, I wonder why it is not possible for the implementation to store the size:

Beware that, unlike in most collections, the size method is ...

4. Implementing two-lock concurrent queue    stackoverflow.com

I'm trying to implement a two-lock concurrent queue in Java, but I can't get it to pass the automated tests. Please let me know the errors in my code:

private static class ...

5. Coordinating multiple concurrent queues    stackoverflow.com

I currently have a concurrent queue implementation that uses a BlockingQueue as the data store. I now need to introduce a second type of object that has a higher priority, ...

6. Queue with notifications on isEmpty() changes    stackoverflow.com

I have an BlockingQueue<Runnable>(taken from ScheduledThreadPoolExecutor) in producer-consumer environment. There is one thread adding tasks to the queue, and a thread pool executing them. I need notifications on two events:

  1. First item added ...

7. Topic-like concurrent queue in plain Java    stackoverflow.com

Before I reinvent the wheel, is there a topic-like concurrent queue in plain Java? I have the following requirements:

  • Multiple readers/consumers
  • Multiple writers/producers
  • Every message must be consumed by every (active) consumer
  • After every consumer ...

8. Java: a time-delayed queue that de-dupes    stackoverflow.com

G'day everyone, I have a system (the source) that needs to notify another system (the target) asynchronously whenever certain objects change. The twist is that the source system may mutate a ...

9. Concurrent linked queue    forums.oracle.com

Thanks for your reply. I will try to frame my question in a correct way. 1. I need to create a queue using concurrent linked queue. 2. I must create a separate producer and consumer thread. Say for example: Consider a cricket score example. For every 5 seconds the score should be added in the queue using producer thread and whenever ...

10. Queue - poll data by some concurrent thread    forums.oracle.com

11. Concurrent queues    forums.oracle.com

import java.util.*; import java.util.concurrent.*; public class QueueTester { public static long BILLION = 1000000000; static class Element implements Delayed { long trigger; String name; Element(String name, long i) { this.name = name; trigger = System.nanoTime() + (i * BILLION); System.out.println("Name: " + name + " / i " + i); } public int compareTo(Delayed other) { long i = trigger; long ...

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.