com.healthmarketscience.rmiio
Class IOIteratorPipe<DataType>

java.lang.Object
  extended by com.healthmarketscience.rmiio.IOIteratorPipe<DataType>

public class IOIteratorPipe<DataType>
extends Object

A "pipe" implementation for IOIterators which is designed for use by two separate threads. Common use would be a ""client" process acting as a bridge between two different "servers", where data is being read from one server via RemoteIterator and written to another server via RemoteIterator.

Note, although the Sink and Source are designed for use by separate threads, the objects themselves are not thread safe, so a given Sink/Source may not be used by more than one thread without external synchronization.

Author:
James Ahlborn

Nested Class Summary
 class IOIteratorPipe.Sink
          The Sink for this pipe.
 class IOIteratorPipe.Source
          The Source for this pipe.
 
Field Summary
static int DEFAULT_QUEUE_SIZE
           
 
Constructor Summary
IOIteratorPipe()
          Constructs an IOIteratorPipe with the DEFAULT_QUEUE_SIZE internal queue size.
IOIteratorPipe(int queueSize)
          Constructs an IOIteratorPipe with the given internal queue size.
 
Method Summary
 IOIteratorPipe.Sink getSink()
           
 IOIteratorPipe.Source getSource()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_QUEUE_SIZE

public static final int DEFAULT_QUEUE_SIZE
See Also:
Constant Field Values
Constructor Detail

IOIteratorPipe

public IOIteratorPipe()
Constructs an IOIteratorPipe with the DEFAULT_QUEUE_SIZE internal queue size.


IOIteratorPipe

public IOIteratorPipe(int queueSize)
Constructs an IOIteratorPipe with the given internal queue size.

Parameters:
queueSize - the maximum number of objects which will be held by this object at any given time.
Method Detail

getSink

public IOIteratorPipe.Sink getSink()
Returns:
the Sink for pushing data into this pipe.

getSource

public IOIteratorPipe.Source getSource()
Returns:
the Source for getting data from this pipe.


Copyright © 2006-2009 Health Market Science. All Rights Reserved.