// ************************************************************************ // $Id: WaitFreeDequeue.java 561 2005-07-11 20:09:17Z mdeters $ // ************************************************************************ // // jRate // // Copyright (C) 2001-2005 by Angelo Corsaro. // // All Rights Reserved. // // Permission to use, copy, modify, and distribute this software and // its documentation for any purpose is hereby granted without fee, // provided that the above copyright notice appear in all copies and // that both that copyright notice and this permission notice appear // in supporting documentation. I don't make any representations // about the suitability of this software for any purpose. It is // provided "as is" without express or implied warranty. // // // ************************************************************************* // // ************************************************************************* package javax.realtime; /** * A queue that provides both unsynchronized nonblocking and * synchronized blocking versions of read() and write(). * * @see WaitFreeReadQueue * @see WaitFreeWriteQueue * @author Morgan Deters * @version 1.0 * @since 0.3.8 */ public class WaitFreeDequeue { /** * Constructs a new {@link WaitFreeDequeue}. * * @param writer the writing thread * @param reader the reading thread * @param maximum the capacity of the queue * @param memory the {@link MemoryArea} in which to allocate the * queue's buffer; if null, then the current memory area is * used */ public WaitFreeDequeue(Thread writer, Thread reader, int maximum, MemoryArea memory) throws IllegalArgumentException, InstantiationException, ClassNotFoundException, IllegalAccessException { throw new UnimplementedFeatureError(); } /** * A synchronized and blocking read operation. * * @return the object removed from the queue */ public Object blockingRead() { throw new UnimplementedFeatureError(); } /** * An unsynchronized and nonblocking read operation. * * @return the object removed from the queue, or null if the * queue is empty */ public Object nonBlockingRead() { throw new UnimplementedFeatureError(); } /** * Replace the last object with this object. Returns false if the * reader removed the other object as this operation was updating * it. * * @param object the object to write to the queue * @return true upon success, false otherwise * @throws MemoryScopeException if the object is in an * incompatible memory area */ public boolean force(Object object) throws MemoryScopeException { throw new UnimplementedFeatureError(); } /** * An unsynchronized and nonblocking write operation. * * @param object the object to write to the queue * @return true upon success, false otherwise * @throws MemoryScopeException if the object is in an * incompatible memory area */ public boolean nonBlockingWrite(Object object) throws MemoryScopeException { throw new UnimplementedFeatureError(); } /** * A synchronized and blocking write operation. * * @param object the object to write to the queue * @return true * @throws MemoryScopeException if the object is in an * incompatible memory area */ public boolean blockingWrite(Object object) throws MemoryScopeException { throw new UnimplementedFeatureError(); } }