public class AbstractWrapper extends Object implements NotifyOnCommitAdaptor, ChunkReceiver
Constructor and Description |
---|
AbstractWrapper() |
Modifier and Type | Method and Description |
---|---|
void |
add(Chunk event)
Add a chunk to the queue, potentially blocking.
|
void |
committed(long commitedByte) |
String |
getCurrentStatus()
Return the adaptor's state Should not include class name or byte
offset, which are written by caller.
|
String |
getType() |
String |
parseArgs(String innerClassName,
String params,
AdaptorManager a)
Note that the name of the inner class will get parsed out as a type
|
long |
shutdown(AdaptorShutdownPolicy shutdownPolicy)
Signals this adaptor to come to an orderly stop.
|
void |
start(String adaptorID,
String type,
long offset,
ChunkReceiver dest)
Note that the name of the inner class will get parsed out as a type
|
public String getCurrentStatus()
Adaptor
getCurrentStatus
in interface Adaptor
public String parseArgs(String innerClassName, String params, AdaptorManager a)
public long shutdown(AdaptorShutdownPolicy shutdownPolicy) throws AdaptorException
Adaptor
shutdown
in interface Adaptor
AdaptorException
public void start(String adaptorID, String type, long offset, ChunkReceiver dest) throws AdaptorException
start
in interface Adaptor
adaptorID
- cutomized application IDtype
- the application type, who is starting this adaptoroffset
- the stream offset of the first byte sent by this adaptordest
- receiver of the chunkAdaptorException
public void add(Chunk event) throws InterruptedException
ChunkReceiver
add
in interface ChunkReceiver
InterruptedException
- if thread is interrupted while blockingpublic void committed(long commitedByte)
committed
in interface NotifyOnCommitAdaptor
Copyright © 2015 Apache Software Foundation. All Rights Reserved.