com.cloudera.sqoop.util
Class AsyncSink

java.lang.Object
  extended by com.cloudera.sqoop.util.AsyncSink
Direct Known Subclasses:
ErrorableAsyncSink, LoggingAsyncSink, NullAsyncSink

public abstract class AsyncSink
extends java.lang.Object

An interface describing a factory class for a Thread class that handles input from some sort of stream. When the stream is closed, the thread should terminate.


Constructor Summary
AsyncSink()
           
 
Method Summary
abstract  int join()
          Wait until the stream has been processed.
abstract  void processStream(java.io.InputStream is)
          Create and run a thread to handle input from the provided InputStream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsyncSink

public AsyncSink()
Method Detail

processStream

public abstract void processStream(java.io.InputStream is)
Create and run a thread to handle input from the provided InputStream. When processStream returns, the thread should be running; it should continue to run until the InputStream is exhausted.


join

public abstract int join()
                  throws java.lang.InterruptedException
Wait until the stream has been processed.

Returns:
a status code indicating success or failure. 0 is typical for success.
Throws:
java.lang.InterruptedException


Copyright © 2010 Cloudera, Inc.