Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

cern::laser::util::buffer::LinkedQueueSynchroBuffer Class Reference

Collaboration diagram for cern::laser::util::buffer::LinkedQueueSynchroBuffer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LinkedQueueSynchroBuffer ()
void push (Object object)
Object take ()
void push (Collection collection)
void setSynchroBufferListener (SynchroBufferListener listener)
void enable ()
void disable ()
void close ()

Private Attributes

SynchroBufferListener listener = null
LinkedQueue buffer = new LinkedQueue()
Thread postman = new Thread(new Postman())

Static Private Attributes

final Logger LOGGER = Logger.getLogger(LinkedQueueSynchroBuffer.class)

Detailed Description

A buffer class which uses an Unbounded linked list implementation with the similar function signatures to SynchroBuffer.

Author:
Niall Stapley
Version:
Revision
1.2
Date
2006/09/25 08:52:37


Constructor & Destructor Documentation

cern::laser::util::buffer::LinkedQueueSynchroBuffer::LinkedQueueSynchroBuffer  )  [inline]
 

The constructor.


Member Function Documentation

void cern::laser::util::buffer::LinkedQueueSynchroBuffer::close  )  [inline]
 

Close the input (head) end of the queue. It cannot be opened again. In this class, this is not implemented currently.

void cern::laser::util::buffer::LinkedQueueSynchroBuffer::disable  )  [inline]
 

Disable the listener. Pushed object are kept in the buffer and delivered when the listener is enabled. In this class, this is not implemented, if starting and stopping the listener input is required, use take() instead, as this gives full control to the consumer as to when it takes an element.

void cern::laser::util::buffer::LinkedQueueSynchroBuffer::enable  )  [inline]
 

Enable the listener. The listener is disabled by default. In this class, it should only be called once after the listener has been set to start receiving elements.

void cern::laser::util::buffer::LinkedQueueSynchroBuffer::push Collection  collection  )  [inline]
 

Push a collection of objects into the buffer.

Parameters:
collection the collection of objects to push

void cern::laser::util::buffer::LinkedQueueSynchroBuffer::push Object  object  )  [inline]
 

Push an object into the buffer.

Parameters:
o the object to push

void cern::laser::util::buffer::LinkedQueueSynchroBuffer::setSynchroBufferListener SynchroBufferListener  listener  )  [inline]
 

Set the buffer consumer listener.

Parameters:
listener the listener

Object cern::laser::util::buffer::LinkedQueueSynchroBuffer::take  )  [inline]
 

Atempt to take an object from the end buffer. There is a chance this was interrupted and null is returned.

Returns:
o the object


Member Data Documentation

LinkedQueue cern::laser::util::buffer::LinkedQueueSynchroBuffer::buffer = new LinkedQueue() [private]
 

The buffer.

SynchroBufferListener cern::laser::util::buffer::LinkedQueueSynchroBuffer::listener = null [private]
 

The single listener to which elements must be delivered.

final Logger cern::laser::util::buffer::LinkedQueueSynchroBuffer::LOGGER = Logger.getLogger(LinkedQueueSynchroBuffer.class) [static, private]
 

For logging.

Thread cern::laser::util::buffer::LinkedQueueSynchroBuffer::postman = new Thread(new Postman()) [private]
 

The thread to run to delivery to the listener.


The documentation for this class was generated from the following file:
Generated on Thu Apr 30 03:09:49 2009 for ACS Java API by doxygen 1.3.8