EDU.oswego.cs.dl.util.concurrent

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » Laszlo 4.0.10 » EDU.oswego.cs.dl.util.concurrent 
EDU.oswego.cs.dl.util.concurrent
Java Source File NameTypeComment
Barrier.javaInterface Barriers serve as synchronization points for groups of threads that must occasionally wait for each other.
BoundedBuffer.javaClass Efficient array-based bounded buffer class. Adapted from CPJ, chapter 8, which describes design.

[ Introduction to this package.

BoundedChannel.javaInterface A channel that is known to have a capacity, signifying that put operations may block when the capacity is reached.
BoundedLinkedQueue.javaClass A bounded variant of LinkedQueue class.
BoundedPriorityQueue.javaClass A heap-based priority queue, using semaphores for concurrency control.
BrokenBarrierException.javaClass
Callable.javaInterface Interface for runnable actions that bear results and/or throw Exceptions. This interface is designed to provide a common protocol for result-bearing actions that can be run independently in threads, in which case they are ordinarily used as the bases of Runnables that set FutureResults

[ Introduction to this package.

Channel.javaInterface Main interface for buffers, queues, pipes, conduits, etc.

A Channel represents anything that you can put items into and take them out of.

ClockDaemon.javaClass A general-purpose time-based daemon, vaguely similar in functionality to common system-level utilities such as at (and the associated crond) in Unix. Objects of this class maintain a single thread and a task queue that may be used to execute Runnable commands in any of three modes -- absolute (run at a given time), relative (run after a given delay), and periodic (cyclically run with a given delay).

All commands are executed by the single background thread.

CondVar.javaClass This class is designed for fans of POSIX pthreads programming. If you restrict yourself to Mutexes and CondVars, you can use most of your favorite constructions.
CountDown.javaClass A CountDown can serve as a simple one-shot barrier.
CyclicBarrier.javaClass A cyclic barrier is a reasonable choice for a barrier in contexts involving a fixed sized group of threads that must occasionally wait for each other.
DefaultChannelCapacity.javaClass A utility class to set the default capacity of BoundedChannel implementations that otherwise require a capacity argument
See Also:   BoundedChannel
See Also:   [ Introduction to this package.
DirectExecutor.javaClass An implementation of Executor that invokes the run method of the supplied command and then returns.

[ Introduction to this package.

Executor.javaInterface Interface for objects that execute Runnables, as well as various objects that can be wrapped as Runnables. The main reason to use Executor throughout a program or subsystem is to provide flexibility: You can easily change from using thread-per-task to using pools or queuing, without needing to change most of your code that generates tasks.

The general intent is that execution be asynchronous, or at least independent of the caller.

FIFOReadWriteLock.javaClass This class implements a policy for reader/writer locks in which threads contend in a First-in/First-out manner for access (modulo the limitations of FIFOSemaphore, which is used for queuing).
FIFOSemaphore.javaClass A First-in/First-out implementation of a Semaphore. Waiting requests will be satisified in the order that the processing of those requests got to a certain point. If this sounds vague it is meant to be.
FJTask.javaClass Abstract base class for Fork/Join Tasks.

FJTasks are lightweight, stripped-down analogs of Threads.

FJTaskRunner.javaClass Specialized Thread subclass for running FJTasks.

Each FJTaskRunner keeps FJTasks in a double-ended queue (DEQ). Double-ended queues support stack-based operations push and pop, as well as queue-based operations put and take. Normally, threads run their own tasks.

FJTaskRunnerGroup.javaClass A stripped down analog of a ThreadGroup used for establishing and managing FJTaskRunner threads. ThreadRunnerGroups serve as the control boundary separating the general world of normal threads from the specialized world of FJTasks.
FutureResult.javaClass A class maintaining a single reference variable serving as the result of an operation.
Heap.javaClass A heap-based priority queue, without any concurrency control (i.e., no blocking on empty/full states). This class provides the data structure mechanics for BoundedPriorityQueue.

The class currently uses a standard array-based heap, as described in, for example, Sedgewick's Algorithms text.

Latch.javaClass A latch is a boolean condition that is set at most once, ever. Once a single release is issued, all acquires will pass.

Sample usage. Here are a set of classes that use a latch as a start signal for a group of worker threads that are created and started beforehand, and then later enabled.

 class Worker implements Runnable {
 private final Latch startSignal;
 Worker(Latch l) { startSignal = l; }
 public void run() {
 startSignal.acquire();
 doWork();
 }
 void doWork() { ...
LayeredSync.javaClass A class that can be used to compose Syncs. A LayeredSync object manages two other Sync objects, outer and inner.
LinkedNode.javaClass
LinkedQueue.javaClass A linked list based channel implementation. The algorithm avoids contention between puts and takes when the queue is not empty.
LockedExecutor.javaClass An implementation of Executor that invokes the run method of the supplied command within a synchronization lock and then returns.

[ Introduction to this package.

Mutex.javaClass A simple non-reentrant mutual exclusion lock. The lock is free upon construction.
NullSync.javaClass A No-Op implementation of Sync.
PooledExecutor.javaClass A tunable, extensible thread pool class.
PrioritySemaphore.javaClass A Semaphore that grants requests to threads with higher Thread priority rather than lower priority when there is contention.
PropertyChangeMulticaster.javaClass This class is interoperable with java.beans.PropertyChangeSupport, but relies on a streamlined copy-on-write scheme similar to that used in CopyOnWriteArrayList.
Puttable.javaInterface This interface exists to enable stricter type checking for channels.
QueuedExecutor.javaClass An implementation of Executor that queues incoming requests until they can be processed by a single background thread.

The thread is not actually started until the first execute request is encountered.

QueuedSemaphore.javaClass Abstract base class for semaphores relying on queued wait nodes.

[ Introduction to this package.

ReaderPreferenceReadWriteLock.javaClass A ReadWriteLock that prefers waiting readers over waiting writers when there is contention.
ReadWriteLock.javaInterface ReadWriteLocks maintain a pair of associated locks. The readLock may be held simultanously by multiple reader threads, so long as there are no writers.
ReentrantLock.javaClass A lock with the same semantics as builtin Java synchronized locks: Once a thread has a lock, it can re-obtain it any number of times without blocking. The lock is made available to other threads when as many releases as acquires have occurred.

[ Introduction to this package.

ReentrantWriterPreferenceReadWriteLock.javaClass A writer-preference ReadWriteLock that allows both readers and writers to reacquire read or write locks in the style of a ReentrantLock. Readers are not allowed until all write locks held by the writing thread have been released. Among other applications, reentrancy can be useful when write locks are held during calls or callbacks to methods that perform reads under read locks.

Sample usage.

Rendezvous.javaClass A rendezvous is a barrier that:
  • Unlike a CyclicBarrier, is not restricted to use with fixed-sized groups of threads. Any number of threads can attempt to enter a rendezvous, but only the predetermined number of parties enter and later become released from the rendezvous at any give time.
  • Enables each participating thread to exchange information with others at the rendezvous point.
Semaphore.javaClass Base class for counting semaphores. Conceptually, a semaphore maintains a set of permits. Each acquire() blocks if necessary until a permit is available, and then takes it.
SemaphoreControlledChannel.javaClass Abstract class for channels that use Semaphores to control puts and takes.

[ Introduction to this package.

Slot.javaClass A one-slot buffer, using semaphores to control access. Slots are usually more efficient and controllable than using other bounded buffers implementations with capacity of 1.

Among other applications, Slots can be convenient in token-passing designs: Here.

Sync.javaInterface Main interface for locks, gates, and conditions.

Sync objects isolate waiting and notification for particular logical states, resource availability, events, and the like that are shared across multiple threads.

SyncCollection.javaClass SyncCollections wrap Sync-based control around java.util.Collections. They are similar in operation to those provided by java.util.Collection.synchronizedCollection, but have several extended capabilities.

The Collection interface is conceptually broken into two parts for purposes of synchronization control.

SynchronizedBoolean.javaClass A class useful for offloading synch for boolean instance variables.

[ Introduction to this package.

SynchronizedByte.javaClass A class useful for offloading synch for byte instance variables.

[ Introduction to this package.

SynchronizedChar.javaClass A class useful for offloading synch for char instance variables.

[ Introduction to this package.

SynchronizedDouble.javaClass A class useful for offloading synch for double instance variables.

[ Introduction to this package.

SynchronizedFloat.javaClass A class useful for offloading synch for float instance variables.

[ Introduction to this package.

SynchronizedInt.javaClass A class useful for offloading synch for int instance variables.

[ Introduction to this package.

SynchronizedLong.javaClass A class useful for offloading synch for long instance variables.

[ Introduction to this package.

SynchronizedRef.javaClass A simple class maintaining a single reference variable that is always accessed and updated under synchronization.

[ Introduction to this package.

SynchronizedShort.javaClass A class useful for offloading synch for short instance variables.

[ Introduction to this package.

SynchronizedVariable.javaClass Base class for simple, small classes maintaining single values that are always accessed and updated under synchronization.
SynchronousChannel.javaClass A rendezvous channel, similar to those used in CSP and Ada.
SyncList.javaClass SyncLists wrap Sync-based control around java.util.Lists. They support the following additional reader operations over SyncCollection: hashCode, equals, get, indexOf, lastIndexOf, subList.
SyncMap.javaClass SyncMaps wrap Sync-based control around java.util.Maps. They operate in the same way as SyncCollection.

Reader operations are

  • size
  • isEmpty
  • get
  • containsKey
  • containsValue
  • keySet
  • entrySet
  • values
Writer operations are:
  • put
  • putAll
  • remove
  • clear

[ Introduction to this package.

SyncSet.javaClass SyncSets wrap Sync-based control around java.util.Sets. They support two additional reader operations than do SyncCollection: hashCode and equals.

[ Introduction to this package.

SyncSortedMap.javaClass SyncSortedMaps wrap Sync-based control around java.util.SortedMaps. They support the following additional reader operations over SyncMap: comparator, subMap, headMap, tailMap, firstKey, lastKey.

[ Introduction to this package.

SyncSortedSet.javaClass SyncSortedSets wrap Sync-based control around java.util.SortedSets. They support the following additional reader operations over SyncCollection: comparator, subSet, headSet, tailSet, first, last.

[ Introduction to this package.

Takable.javaInterface This interface exists to enable stricter type checking for channels.
ThreadedExecutor.javaClass An implementation of Executor that creates a new Thread that invokes the run method of the supplied command.

[ Introduction to this package.

ThreadFactory.javaInterface Interface describing any class that can generate new Thread objects.
ThreadFactoryUser.javaClass Base class for Executors and related classes that rely on thread factories. Generally intended to be used as a mixin-style abstract class, but can also be used stand-alone.

[ Introduction to this package.

TimedCallable.javaClass TimedCallable runs a Callable function for a given length of time. The function is run in its own thread.
TimeoutException.javaClass Thrown by synchronization classes that report timeouts via exceptions.
TimeoutSync.javaClass A TimeoutSync is an adaptor class that transforms all calls to acquire to instead invoke attempt with a predetermined timeout value.

Sample Usage.

VetoableChangeMulticaster.javaClass This class is interoperable with java.beans.VetoableChangeSupport, but relies on a streamlined copy-on-write scheme similar to that used in CopyOnWriteArrayList.
WaitableBoolean.javaClass A class useful for offloading synch for boolean instance variables.

[ Introduction to this package.

WaitableByte.javaClass A class useful for offloading waiting and signalling operations on single byte variables.
WaitableChar.javaClass A class useful for offloading waiting and signalling operations on single char variables.
WaitableDouble.javaClass A class useful for offloading waiting and signalling operations on single double variables.
WaitableFloat.javaClass A class useful for offloading waiting and signalling operations on single float variables.
WaitableInt.javaClass A class useful for offloading waiting and signalling operations on single int variables.
WaitableLong.javaClass A class useful for offloading waiting and signalling operations on single long variables.
WaitableRef.javaClass A class useful for offloading synch for Object reference instance variables.

[ Introduction to this package.

WaitableShort.javaClass A class useful for offloading waiting and signalling operations on single short variables.
WaiterPreferenceSemaphore.javaClass An implementation of counting Semaphores that enforces enough fairness for applications that need to avoid indefinite overtaking without necessarily requiring FIFO ordered access. Empirically, very little is paid for this property unless there is a lot of contention among threads or very unfair JVM scheduling. The acquire method waits even if there are permits available but have not yet been claimed by threads that have been notified but not yet resumed.
WaitFreeQueue.javaClass A wait-free linked list based queue implementation.

While this class conforms to the full Channel interface, only the put and poll methods are useful in most applications.

WriterPreferenceReadWriteLock.javaClass A ReadWriteLock that prefers waiting writers over waiting readers when there is contention.
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.