edu.unh.sdb.datasource
Class RemoteBFDS

java.lang.Object
  extended by edu.unh.sdb.datasource.DataCollection
      extended by edu.unh.sdb.datasource.DataSource
          extended by edu.unh.sdb.datasource.PhysicalDataSource
              extended by edu.unh.sdb.datasource.RemoteBFDS
All Implemented Interfaces:
Indexable

public class RemoteBFDS
extends PhysicalDataSource

This class will read data from a remote datasource


Field Summary
 
Fields inherited from class edu.unh.sdb.datasource.PhysicalDataSource
BIG_ENDIAN, bufferBounds, bufferDimension, bufferSteps, byteBuffers, directMemoryLimit, endian, LITTLE_ENDIAN, maxBufferSize, maxGapSize, readCounter, readLength, url
 
Fields inherited from class edu.unh.sdb.datasource.DataSource
fdlDescriptor, isActivated, name, wsName
 
Fields inherited from class edu.unh.sdb.datasource.DataCollection
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc
 
Constructor Summary
RemoteBFDS(java.lang.String name, RecordDescriptor recordDesc, ISBounds theBounds, AxisOrdering ordering, java.lang.String URL, java.lang.String serverURL)
          crate a RemoteBFDS, set the initial file offset at 0
 
Method Summary
 void activate()
          Open the binary data file for this datasource.
 void datum(Datum datum, IndexSpaceID did)
          Given an IndexSpaceID, copy the values of the Datum at that position to the argument Datum.
 void datum(Datum datum, IndexSpaceID did, FieldIDMapper mp)
          Get the Datum and fill its values in the passed Datum at positions specified by the corresponding FieldIDMapper.
 void datum(Datum datum, IndexSpaceID did, RecordSpec recSpec)
          Get the Datum and fill its values in the passed Datum at positions specified by the corresponding RecordSpec.
 Datum datum(IndexSpaceID did)
          Return the Datum corresponding to the given IndexSpaceID.
 Datum datum(IndexSpaceID did, RecordSpec spec)
          Return the Datum corresponding to the given IndexSpaceID.
 void init()
           
static void main(java.lang.String[] args)
           
 void setFileServer(java.lang.String serverURL)
          Set remote file server specified by the argument string.
 void setRemoteDataSource(java.lang.String xmlFile, java.lang.String dsName)
          set the xml file for the remote datasource
protected  void subBasicBlock(BasicBlock dstBlock, ISBounds dstBounds, ISBounds srcBounds)
          this method will invoke remote datasource server extract data from the disk, and push it into the java socket
 long transmitTime()
           
 
Methods inherited from class edu.unh.sdb.datasource.PhysicalDataSource
allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, allocateBuffer, deactivate, deleteBuffer, deleteBuffer, deleteBuffers, equals, getBuffer, getBuffer, getBufferSize, getBufferSize, getByteOrder, getDataFileString, getMaxBufferSize, getReadCounter, getReadLength, getURL, initializeBuffers, isBigEndian, makeBestBuffer, resetReadCounter, setBufferByteOrder, setMaxBufferSize, setMaxGapSize, subblock, subblock, subblock, toString, toString
 
Methods inherited from class edu.unh.sdb.datasource.DataSource
checkActivated, clearCache, copyBestID, create, create, create, createRemote, createRemote, createRemoteClient, createRemoteClient, createRemoteDataSource, createRemoteDataSource, createRemoteDataSourceUDP, createRemoteUDP, createRemoteUDP, dumpData, getName, getValues, isActivated
 
Methods inherited from class edu.unh.sdb.datasource.DataCollection
byteSize, computeOffset, computeOffset, copyBounds, createDataBlock, createDataBlock, createDataBlock, createDatum, createDatum, createDatum, createDatum, createDatum, createDatum, datum, datum, dim, getAxisOrdering, getAxisWeight, getAxisWeights, getBounds, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytesByAttribute, getBytesByAttribute, getBytesByPoint, getBytesByPoint, getDataOrder, getDimensionsArray, getDouble, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoublesByAttribute, getDoublesByAttribute, getDoublesByPoint, getDoublesByPoint, getFloat, getFloats, getFloats, getFloats, getFloats, getFloats, getFloats, getFloatsByAttribute, getFloatsByAttribute, getFloatsByPoint, getFloatsByPoint, getInt, getInts, getInts, getInts, getInts, getInts, getInts, getIntsByAttribute, getIntsByAttribute, getIntsByPoint, getIntsByPoint, getLowerBoundsArray, getNumAttributes, getRecordDescriptor, getShort, getShorts, getShorts, getShorts, getShorts, getShorts, getShorts, getShortsByAttribute, getShortsByAttribute, getShortsByPoint, getShortsByPoint, getStorageType, getValues, getValuesByAttribute, getValuesByPoint, longVolume, setAxisOrdering, setBounds, setRecordDescriptor, size, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, useBytesOnly, volume
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RemoteBFDS

public RemoteBFDS(java.lang.String name,
                  RecordDescriptor recordDesc,
                  ISBounds theBounds,
                  AxisOrdering ordering,
                  java.lang.String URL,
                  java.lang.String serverURL)
crate a RemoteBFDS, set the initial file offset at 0

Method Detail

setFileServer

public void setFileServer(java.lang.String serverURL)
Set remote file server specified by the argument string. The string should be format as "//hostname/server_object_name" For example, a file server, named SAMPLE-SERVER is running on zheng.cs.unh.edu The argument string should look like "//zheng.cs.unh.edu/SAMPLE-SERVER"


init

public void init()

activate

public void activate()
Open the binary data file for this datasource.

Overrides:
activate in class DataSource

setRemoteDataSource

public void setRemoteDataSource(java.lang.String xmlFile,
                                java.lang.String dsName)
set the xml file for the remote datasource


datum

public Datum datum(IndexSpaceID did)
Return the Datum corresponding to the given IndexSpaceID.

Specified by:
datum in interface Indexable
Overrides:
datum in class DataCollection

datum

public void datum(Datum datum,
                  IndexSpaceID did)
Description copied from class: DataCollection
Given an IndexSpaceID, copy the values of the Datum at that position to the argument Datum. TODO Define error conditions

Specified by:
datum in interface Indexable
Overrides:
datum in class DataCollection

datum

public void datum(Datum datum,
                  IndexSpaceID did,
                  RecordSpec recSpec)
Get the Datum and fill its values in the passed Datum at positions specified by the corresponding RecordSpec.

Specified by:
datum in interface Indexable
Overrides:
datum in class DataCollection

datum

public void datum(Datum datum,
                  IndexSpaceID did,
                  FieldIDMapper mp)
Get the Datum and fill its values in the passed Datum at positions specified by the corresponding FieldIDMapper.

Specified by:
datum in interface Indexable
Specified by:
datum in class DataCollection

datum

public Datum datum(IndexSpaceID did,
                   RecordSpec spec)
Return the Datum corresponding to the given IndexSpaceID. The Datum will only contain attributes specified by the RecordSpec argument.

Specified by:
datum in interface Indexable
Overrides:
datum in class DataCollection

subBasicBlock

protected void subBasicBlock(BasicBlock dstBlock,
                             ISBounds dstBounds,
                             ISBounds srcBounds)
this method will invoke remote datasource server extract data from the disk, and push it into the java socket


transmitTime

public long transmitTime()

main

public static void main(java.lang.String[] args)