com.metamatrix.common.buffer.impl
Class TupleSourceInfo

java.lang.Object
  extended by com.metamatrix.common.buffer.impl.TupleSourceInfo

public class TupleSourceInfo
extends java.lang.Object

Describe a TupleSource and all important information about it.


Constructor Summary
TupleSourceInfo(TupleSourceID tsID, java.util.List schema, java.lang.String[] types, com.metamatrix.common.buffer.impl.TupleGroupInfo groupInfo, BufferManager.TupleSourceType type)
          Construct a TupleSourceInfo given information about it.
 
Method Summary
 void addBatch(com.metamatrix.common.buffer.impl.ManagedBatch batch)
           
 void addLobReference(Streamable<java.lang.Object> lob)
           
 com.metamatrix.common.buffer.impl.ManagedBatch getBatch(int beginRow)
          Returns the batch containing the begin row or null if it doesn't exist
 java.util.Iterator<com.metamatrix.common.buffer.impl.ManagedBatch> getBatchIterator()
           
 com.metamatrix.common.buffer.impl.TupleGroupInfo getGroupInfo()
          Get group this tuple source is in.
 Streamable<?> getLobReference(java.lang.String id)
           
 int getRowCount()
          Get current row count
static java.lang.String getStaleLobTupleSource()
           
 BufferManager.TupleSourceStatus getStatus()
          Get status of this tuple source, as defined in BufferManager constants
 java.util.List getTupleSchema()
          Get the tuple schema describing a tuple source
 TupleSourceID getTupleSourceID()
          Get the tuple source identifier
 BufferManager.TupleSourceType getType()
          Get type of this tuple source
 java.lang.String[] getTypes()
           
 boolean isRemoved()
          Check whether this tuple source has been removed.
 boolean lobsInSource()
           
 void removeBatch(int beginRow)
           
 void setContainingLobReference(Streamable<?> s)
           
 void setRemoved()
          Set a flag that this tuple source has been removed
 void setRowCount(int rows)
          Set the current row count
 void setStatus(BufferManager.TupleSourceStatus status)
          Set status of this tuple source
 java.lang.String toString()
          Get string representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TupleSourceInfo

public TupleSourceInfo(TupleSourceID tsID,
                       java.util.List schema,
                       java.lang.String[] types,
                       com.metamatrix.common.buffer.impl.TupleGroupInfo groupInfo,
                       BufferManager.TupleSourceType type)
Construct a TupleSourceInfo given information about it.

Parameters:
tsID - Identifier
schema - Schema describing tuple source
groupInfo - The tuple gorup to which this tuple source belongs
type - Type of tuple source, as defined in BufferManager constants
Method Detail

setContainingLobReference

public void setContainingLobReference(Streamable<?> s)

addLobReference

public void addLobReference(Streamable<java.lang.Object> lob)

getStaleLobTupleSource

public static java.lang.String getStaleLobTupleSource()

getLobReference

public Streamable<?> getLobReference(java.lang.String id)

addBatch

public void addBatch(com.metamatrix.common.buffer.impl.ManagedBatch batch)

getBatch

public com.metamatrix.common.buffer.impl.ManagedBatch getBatch(int beginRow)
Returns the batch containing the begin row or null if it doesn't exist

Parameters:
beginRow -
Returns:

removeBatch

public void removeBatch(int beginRow)

getBatchIterator

public java.util.Iterator<com.metamatrix.common.buffer.impl.ManagedBatch> getBatchIterator()

getTupleSourceID

public TupleSourceID getTupleSourceID()
Get the tuple source identifier

Returns:
Tuple source identifier

getTupleSchema

public java.util.List getTupleSchema()
Get the tuple schema describing a tuple source

Returns:
Schema

getGroupInfo

public com.metamatrix.common.buffer.impl.TupleGroupInfo getGroupInfo()
Get group this tuple source is in. Never null

Returns:
TupleGroupInfo instance representing the tuple group to which this tuple source belongs.

getRowCount

public int getRowCount()
Get current row count

Returns:
Row count

setRowCount

public void setRowCount(int rows)
Set the current row count

Parameters:
rows - New row count

getStatus

public BufferManager.TupleSourceStatus getStatus()
Get status of this tuple source, as defined in BufferManager constants

Returns:
Status

setStatus

public void setStatus(BufferManager.TupleSourceStatus status)
Set status of this tuple source

Parameters:
status - New status

getType

public BufferManager.TupleSourceType getType()
Get type of this tuple source

Returns:
Type of tuple source

isRemoved

public boolean isRemoved()
Check whether this tuple source has been removed. Due to synchronization, this tuple source may have been removed between the time it was retrieved and now.


setRemoved

public void setRemoved()
Set a flag that this tuple source has been removed


lobsInSource

public boolean lobsInSource()

getTypes

public java.lang.String[] getTypes()

toString

public java.lang.String toString()
Get string representation

Overrides:
toString in class java.lang.Object
Returns:
String representation


Copyright © 2009. All Rights Reserved.