Classes | Public Member Functions

cern.laser.util.buffer.LinkedQueueSynchroBuffer Class Reference

List of all members.

Classes

class  Postman

Public Member Functions

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

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 (  ) 

The constructor.


Member Function Documentation

void cern.laser.util.buffer.LinkedQueueSynchroBuffer.close (  ) 

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 (  ) 

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 (  ) 

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 ( Object  object  ) 

Push an object into the buffer.

Parameters:
o the object to push

Referenced by cern.laser.util.buffer.LinkedQueueSynchroBuffer.push().

void cern.laser.util.buffer.LinkedQueueSynchroBuffer.push ( Collection  collection  ) 

Push a collection of objects into the buffer.

Parameters:
collection the collection of objects to push

References cern.laser.util.buffer.LinkedQueueSynchroBuffer.push().

void cern.laser.util.buffer.LinkedQueueSynchroBuffer.setSynchroBufferListener ( SynchroBufferListener  listener  ) 

Set the buffer consumer listener.

Parameters:
listener the listener
Object cern.laser.util.buffer.LinkedQueueSynchroBuffer.take (  ) 

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

Returns:
o the object

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations Properties