Package org.pentaho.di.core
Interface RowSet
- All Known Implementing Classes:
BlockingBatchingRowSet,BlockingListeningRowSet,BlockingRowSet,QueueRowSet,SingleRowRowSet
public interface RowSet
-
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear this rowset: remove all rows and remove the "done" flag.intgetName()intObject[]getRow()Get a row from the input buffer, it blocks for a short period until a new row becomes available.Object[]Get the first row in the list immediately.Object[]getRowWait(long timeout, TimeUnit tu) get the first row in the list immediately if it is available or wait until timeoutbooleanbooleanisDone()booleanputRow(RowMetaInterface rowMeta, Object[] rowData) Offer a row of data to this rowset providing for the description (metadata) of the row.booleanputRowWait(RowMetaInterface rowMeta, Object[] rowData, long time, TimeUnit tu) Offer a row of data to this rowset providing for the description (metadata) of the row.voidsetDone()voidsetRemoteSlaveServerName(String remoteSlaveServerName) voidsetRowMeta(RowMetaInterface rowMeta) voidsetThreadNameFromToCopy(String from, int fromCopy, String to, int toCopy) This method is used only in Trans.java when created RowSet at line 333.intsize()
-
Method Details
-
putRow
Offer a row of data to this rowset providing for the description (metadata) of the row. If the buffer is full, wait (block) for a small period of time.- Parameters:
rowMeta- The description of the row datarowData- the row of data- Returns:
- true if the row was successfully added to the rowset and false if this buffer was full.
-
putRowWait
Offer a row of data to this rowset providing for the description (metadata) of the row. If the buffer is full, wait (block) for a period of time defined in this call.- Parameters:
rowMeta- The description of the row datarowData- the row of datatime- The number of units of timetu- The unit of time to use- Returns:
- true if the row was successfully added to the rowset and false if this buffer was full.
-
getRow
Object[] getRow()Get a row from the input buffer, it blocks for a short period until a new row becomes available. Otherwise, it returns null.- Returns:
- a row of data or null if no row is available.
-
getRowImmediate
Object[] getRowImmediate()Get the first row in the list immediately.- Returns:
- a row of data or null if no row is available.
-
getRowWait
get the first row in the list immediately if it is available or wait until timeout- Returns:
- a row of data or null if no row is available.
-
setDone
void setDone() -
isDone
boolean isDone()- Returns:
- Returns true if there is no more input and vice versa
-
getOriginStepName
String getOriginStepName()- Returns:
- Returns the originStepName.
-
getOriginStepCopy
int getOriginStepCopy()- Returns:
- Returns the originStepCopy.
-
getDestinationStepName
String getDestinationStepName()- Returns:
- Returns the destinationStepName.
-
getDestinationStepCopy
int getDestinationStepCopy()- Returns:
- Returns the destinationStepCopy.
-
getName
String getName() -
size
int size()- Returns:
- Return the size (or max capacity) of the RowSet
-
setThreadNameFromToCopy
This method is used only in Trans.java when created RowSet at line 333. Don't need any synchronization on this method -
getRowMeta
RowMetaInterface getRowMeta()- Returns:
- the rowMeta
-
setRowMeta
- Parameters:
rowMeta- the rowMeta to set
-
getRemoteSlaveServerName
String getRemoteSlaveServerName()- Returns:
- the targetSlaveServer
-
setRemoteSlaveServerName
- Parameters:
remoteSlaveServerName- the remote slave server to set
-
isBlocking
boolean isBlocking()- Returns:
- true if this row set is blocking.
-
clear
void clear()Clear this rowset: remove all rows and remove the "done" flag.
-