Top Description Constructors Methods
com.ziclix.python.sql.pipe

public Class Pipe

Additional top-level classes in compilation unit: PipeRunner, SourceRunner, SinkRunner.

extends Object
Class Inheritance
Imports
org.python.core.*, com.ziclix.python.sql.*, com.ziclix.python.sql.util.*

Manager for a Sink and Source. The Pipe creates a Queue through which the Source can feed data to the Sink. Both Sink and Source run in their own thread and can are completely independent of the other. When the Source pushes None onto the Queue, the piping is stopped and the Sink finishes processing all the remaining data. This class is especially useful for loading/copying data from one database or table to another.
Author
brian zimmer

Constructor Summary

AccessConstructor and Description
public
Pipe()

Default empty constructor.

Method Summary

Modifier and TypeMethod and Description
public PyObject

Returns:

the number of rows seen (this includes the header row)
pipe
(Source
the data generator
source
,
Sink
the consumer of the data
sink
)

Start the processing of the Source to the Sink.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

Pipeback to summary
public Pipe()

Default empty constructor.

Method Detail

pipeback to summary
public PyObject pipe(Source source, Sink sink)

Start the processing of the Source to the Sink.

Parameters
source:Source

the data generator

sink:Sink

the consumer of the data

Returns:PyObject

the number of rows seen (this includes the header row)