edu.unh.sdb.datasource
Class BlockManager

java.lang.Object
  extended by edu.unh.sdb.datasource.BlockManager
Direct Known Subclasses:
OverlapBlockManager

public class BlockManager
extends java.lang.Object


Field Summary
protected  int[] accessHistory
           
protected  ISBounds[] blockBounds
           
protected  ISBounds bounds
           
protected  ComponentInfo[] components
           
protected  int dim
           
protected  boolean[] fmpFlags
           
protected  RecordDescriptor recordDesc
           
protected  int size
           
protected  int[] sortArray
           
 
Constructor Summary
BlockManager(ComponentInfo[] cinfo)
          Construct a BlockManager from an array of ComponentInfo.
 
Method Summary
 ARBlock ARRep(ISBounds bounds)
          Return a ARBlock, which is a AR representation of the requested area of specified ISBounds
static ISBounds buildISBounds(ComponentInfo[] cinfo)
           
 boolean check(ComponentInfo[] cinfo)
           
 void datum(Datum d, IndexSpaceID id)
          Pass by reference datum method.
 void datum(Datum d, IndexSpaceID id, FieldIDMapper fmap)
          Pass by reference datum method.
 void datum(Datum d, IndexSpaceID id, RecordSpec spec)
          Pass by reference datum method.
 Datum datum(IndexSpaceID id)
          Deprecated.  
 Datum datum(IndexSpaceID id, RecordSpec spec)
          Deprecated.  
 int dim()
          return the dimensionality of this BlockManager
 ISBounds getBounds()
          Return the Bounds of this BlockManager
 ComponentInfo[] getComponentInfo()
          Return the ComponentInfo array.
 ComponentInfo getComponentInfo(int index)
          Return the ComponentInfo specified by the index.
 RecordDescriptor getRecordDescriptor()
          Return the RecordDescriptor of this BlockManager
protected  ISBounds hasIntersection(ISBounds isb1, ISBounds isb2)
           
static boolean isRegular(ComponentInfo[] cinfo)
          Return true if the data is regular data, i.e.
 int searchBlock(IndexSpaceID isid)
           
 int size()
          Return the number of components within this BlockManager
 void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, FieldIDMapper mp)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 void subblock(DataBlock theBlock, ISBounds dstBounds, ISBounds srcBounds, RecordSpec spec)
          Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

components

protected ComponentInfo[] components

recordDesc

protected RecordDescriptor recordDesc

bounds

protected ISBounds bounds

dim

protected int dim

size

protected int size

blockBounds

protected ISBounds[] blockBounds

fmpFlags

protected boolean[] fmpFlags

accessHistory

protected int[] accessHistory

sortArray

protected int[] sortArray
Constructor Detail

BlockManager

public BlockManager(ComponentInfo[] cinfo)
Construct a BlockManager from an array of ComponentInfo.

Method Detail

isRegular

public static boolean isRegular(ComponentInfo[] cinfo)
Return true if the data is regular data, i.e. components form a regualar grid


buildISBounds

public static ISBounds buildISBounds(ComponentInfo[] cinfo)

check

public boolean check(ComponentInfo[] cinfo)

getBounds

public ISBounds getBounds()
Return the Bounds of this BlockManager


datum

public void datum(Datum d,
                  IndexSpaceID id,
                  FieldIDMapper fmap)
Pass by reference datum method. Retunrs the Datum corresponding to the given IndexSpaceID and FieldIDMapper.


datum

public void datum(Datum d,
                  IndexSpaceID id)
Pass by reference datum method. Retunrs the Datum corresponding to the given IndexSpaceID.


datum

public void datum(Datum d,
                  IndexSpaceID id,
                  RecordSpec spec)
Pass by reference datum method. Retunrs the Datum corresponding to the given IndexSpaceID and RecordSpec.


datum

public Datum datum(IndexSpaceID id)
Deprecated. 

Return the Datum corresponding to the given IndexSpaceID.


datum

public Datum datum(IndexSpaceID id,
                   RecordSpec spec)
Deprecated. 

Return the Datum corresponding to the given IndexSpaceID and RecordSpec.


subblock

public void subblock(DataBlock theBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds,
                     FieldIDMapper mp)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. The FieldIDMapper argument determines the mapping between datums in the datasource and datums in the DataBlock.


subblock

public void subblock(DataBlock theBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds.


subblock

public void subblock(DataBlock theBlock,
                     ISBounds dstBounds,
                     ISBounds srcBounds,
                     RecordSpec spec)
Reads a subblock defined by srcBounds into the region of the Datablock argument defined by dstBounds. The RecordSpec argument specifies a subset of the DataSource attributes to be written into the DataBlock datums.


getComponentInfo

public ComponentInfo[] getComponentInfo()
Return the ComponentInfo array.


getComponentInfo

public ComponentInfo getComponentInfo(int index)
Return the ComponentInfo specified by the index.


getRecordDescriptor

public RecordDescriptor getRecordDescriptor()
Return the RecordDescriptor of this BlockManager


size

public int size()
Return the number of components within this BlockManager


dim

public int dim()
return the dimensionality of this BlockManager


ARRep

public ARBlock ARRep(ISBounds bounds)
Return a ARBlock, which is a AR representation of the requested area of specified ISBounds


hasIntersection

protected ISBounds hasIntersection(ISBounds isb1,
                                   ISBounds isb2)

searchBlock

public int searchBlock(IndexSpaceID isid)