|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.edf.adapter.AdapterHandler
public abstract class AdapterHandler
A functor used by an adapter to emit records.
Method Summary | |
---|---|
abstract void |
emit(Record record)
Send a record off to be processed by this handler. |
abstract void |
flushLog()
Flush any log messages that have been buffered. |
abstract java.lang.String |
getInputDirectory()
Gets the input, state, or tmp directory used by forge. |
abstract java.lang.String |
getName()
|
abstract int |
getNumInputs()
|
abstract double |
getPercentComplete()
Get the current completion level for this adapter. |
abstract double |
getPercentComplete(int recordSource)
|
Record |
getRecord()
|
abstract Record |
getRecord(int recordSource)
Get a record from the specified record input in forge. |
abstract Record |
getRecord(java.lang.String recordSource)
Get a record from the specified input in forge. |
abstract java.lang.String |
getStateDirectory()
|
abstract java.lang.String |
getTmpDirectory()
|
long |
getTotalNumberOfRecordsToEmit()
Get the total number of records that are to be emitted. |
abstract void |
setAutoFlushLog(boolean autoFlush)
Set whether log messages are flushed as soon as they are logged. |
abstract void |
setPercentComplete(double pc)
Set the current completion level for this adapter. |
void |
setTotalNumberOfRecordsToEmit(long numberToEmit)
Sets the total number of records that are to be emitted. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public abstract void emit(Record record) throws AdapterException
record
- the record to process.
AdapterException
- if this handler fails to process the record. A
sub-class of AdapterException
,
ShutdownRequestAdapterException
, maybe
thrown by AdapterHandler
to notify the
caller that it will not process anymore records emitted.public abstract void flushLog() throws AdapterException
AdapterException
public abstract void setAutoFlushLog(boolean autoFlush)
autoFlush
- whether to flush messages as soon as thery are logged.public abstract Record getRecord(int recordSource) throws AdapterException
recordSource
- The record source from which to get the record.
Record sources are numbered from zero. Sources are numbered in the
order they appear as inputs in the pipeline file.
AdapterException
- if this handler fails to get a Record. A
sub-class of AdapterException
,
ShutdownRequestAdapterException
, maybe
thrown by AdapterHandler
to notify the
caller that it will not process anymore records emitted.public abstract Record getRecord(java.lang.String recordSource) throws AdapterException
AdapterException
public final Record getRecord() throws AdapterException
AdapterException
public abstract double getPercentComplete(int recordSource) throws AdapterException
AdapterException
public abstract int getNumInputs()
public abstract java.lang.String getInputDirectory()
public abstract java.lang.String getStateDirectory()
public abstract java.lang.String getTmpDirectory()
public abstract java.lang.String getName()
public void setTotalNumberOfRecordsToEmit(long numberToEmit)
numberToEmit
- the number of records that the adapter will emit.public long getTotalNumberOfRecordsToEmit()
public abstract void setPercentComplete(double pc)
pc
- The current completion level, between 0 and 100.public abstract double getPercentComplete()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |