Package org.pentaho.di.core
Class SingleRowRowSet
java.lang.Object
org.pentaho.di.core.SingleRowRowSet
- All Implemented Interfaces:
Comparable<RowSet>,RowSet
A simplified rowset for steps that always only need to only have a single row on input...
- Author:
- matt
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AtomicIntegerprotected Stringprotected AtomicBooleanprotected AtomicIntegerprotected Stringprotected Stringprotected RowMetaInterface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clear this rowset: remove all rows and remove the "done" flag.intCompares using the target steps and copy, not the source.booleanequals(org.pentaho.di.core.BaseRowSet rowSet) 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 timeoutbooleanBy default we don't report blocking, only for monitored transformations.booleanisDone()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()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.pentaho.di.core.RowSet
getDestinationStepCopy, getDestinationStepName, getName, getOriginStepCopy, getOriginStepName, getRemoteSlaveServerName, getRowMeta, isBlocking, isDone, setDone, setRemoteSlaveServerName, setRowMeta, setThreadNameFromToCopy
-
Field Details
-
rowMeta
-
done
-
originStepName
-
originStepCopy
-
destinationStepName
-
destinationStepCopy
-
remoteSlaveServerName
-
-
Constructor Details
-
SingleRowRowSet
public SingleRowRowSet()
-
-
Method Details
-
getRow
Description copied from interface:RowSetGet a row from the input buffer, it blocks for a short period until a new row becomes available. Otherwise, it returns null. -
getRowImmediate
Description copied from interface:RowSetGet the first row in the list immediately.- Specified by:
getRowImmediatein interfaceRowSet- Returns:
- a row of data or null if no row is available.
-
getRowWait
Description copied from interface:RowSetget the first row in the list immediately if it is available or wait until timeout- Specified by:
getRowWaitin interfaceRowSet- Returns:
- a row of data or null if no row is available.
-
putRow
Description copied from interface:RowSetOffer 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. -
putRowWait
Description copied from interface:RowSetOffer 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.- Specified by:
putRowWaitin interfaceRowSet- 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.
-
size
public int size() -
clear
public void clear()Description copied from interface:RowSetClear this rowset: remove all rows and remove the "done" flag. -
compareTo
Compares using the target steps and copy, not the source. That way, re-partitioning is always done in the same way.- Specified by:
compareToin interfaceComparable<RowSet>
-
equals
public boolean equals(org.pentaho.di.core.BaseRowSet rowSet) -
setDone
public void setDone() -
isDone
public boolean isDone() -
getOriginStepName
- Specified by:
getOriginStepNamein interfaceRowSet- Returns:
- Returns the originStepName.
-
getOriginStepCopy
public int getOriginStepCopy()- Specified by:
getOriginStepCopyin interfaceRowSet- Returns:
- Returns the originStepCopy.
-
getDestinationStepName
- Specified by:
getDestinationStepNamein interfaceRowSet- Returns:
- Returns the destinationStepName.
-
getDestinationStepCopy
public int getDestinationStepCopy()- Specified by:
getDestinationStepCopyin interfaceRowSet- Returns:
- Returns the destinationStepCopy.
-
getName
-
setThreadNameFromToCopy
Description copied from interface:RowSetThis method is used only in Trans.java when created RowSet at line 333. Don't need any synchronization on this method- Specified by:
setThreadNameFromToCopyin interfaceRowSet
-
toString
-
getRowMeta
- Specified by:
getRowMetain interfaceRowSet- Returns:
- the rowMeta
-
setRowMeta
- Specified by:
setRowMetain interfaceRowSet- Parameters:
rowMeta- the rowMeta to set
-
getRemoteSlaveServerName
- Specified by:
getRemoteSlaveServerNamein interfaceRowSet- Returns:
- the targetSlaveServer
-
setRemoteSlaveServerName
- Specified by:
setRemoteSlaveServerNamein interfaceRowSet- Parameters:
remoteSlaveServerName- the remote slave server to set
-
isBlocking
public boolean isBlocking()By default we don't report blocking, only for monitored transformations.- Specified by:
isBlockingin interfaceRowSet- Returns:
- true if this row set is blocking on reading or writing.
-