javax.realtime
Class WaitFreeDequeue

java.lang.Object
  extended byjavax.realtime.WaitFreeDequeue

Deprecated. This class is deprecated in version 1.0.1(b) of the RTSJ. Use WaitFreeReadQueue and WaitFreeWriteQueue instead.

public class WaitFreeDequeue
extends Object

A queue that provides both unsynchronized nonblocking and synchronized blocking versions of read() and write().

Since:
0.3.8
Author:
Morgan Deters
See Also:
WaitFreeReadQueue, WaitFreeWriteQueue

Constructor Summary
WaitFreeDequeue(Thread writer, Thread reader, int maximum, MemoryArea memory)
          Deprecated. Constructs a new WaitFreeDequeue.
 
Method Summary
 Object blockingRead()
          Deprecated. A synchronized and blocking read operation.
 boolean blockingWrite(Object object)
          Deprecated. A synchronized and blocking write operation.
 boolean force(Object object)
          Deprecated. Replace the last object with this object.
 Object nonBlockingRead()
          Deprecated. An unsynchronized and nonblocking read operation.
 boolean nonBlockingWrite(Object object)
          Deprecated. An unsynchronized and nonblocking write operation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaitFreeDequeue

public WaitFreeDequeue(Thread writer,
                       Thread reader,
                       int maximum,
                       MemoryArea memory)
                throws IllegalArgumentException,
                       InstantiationException,
                       ClassNotFoundException,
                       IllegalAccessException
Deprecated. 
Constructs a new WaitFreeDequeue.

Parameters:
writer - the writing thread
reader - the reading thread
maximum - the capacity of the queue
memory - the MemoryArea in which to allocate the queue's buffer; if null, then the current memory area is used
Method Detail

blockingRead

public Object blockingRead()
Deprecated. 
A synchronized and blocking read operation.

Returns:
the object removed from the queue

nonBlockingRead

public Object nonBlockingRead()
Deprecated. 
An unsynchronized and nonblocking read operation.

Returns:
the object removed from the queue, or null if the queue is empty

force

public boolean force(Object object)
              throws MemoryScopeException
Deprecated. 
Replace the last object with this object. Returns false if the reader removed the other object as this operation was updating it.

Parameters:
object - the object to write to the queue
Returns:
true upon success, false otherwise
Throws:
MemoryScopeException - if the object is in an incompatible memory area

nonBlockingWrite

public boolean nonBlockingWrite(Object object)
                         throws MemoryScopeException
Deprecated. 
An unsynchronized and nonblocking write operation.

Parameters:
object - the object to write to the queue
Returns:
true upon success, false otherwise
Throws:
MemoryScopeException - if the object is in an incompatible memory area

blockingWrite

public boolean blockingWrite(Object object)
                      throws MemoryScopeException
Deprecated. 
A synchronized and blocking write operation.

Parameters:
object - the object to write to the queue
Returns:
true
Throws:
MemoryScopeException - if the object is in an incompatible memory area


jRate is developed and maintained by the jRate project development team.
Copyright (c) 2001-2006 Angelo Corsaro and Morgan Deters.