com.tivoli.twg.monitor
Class TWGMonRecordedData

java.lang.Object
  extended bycom.tivoli.twg.monitor.TWGMonRecordedData
All Implemented Interfaces:
java.io.Serializable

public class TWGMonRecordedData
extends java.lang.Object
implements java.io.Serializable

This is the TWGMonRecordedData class. This class encapsulates a set of paired times and TWGMonCurrentData points.

See Also:
Serialized Form

Constructor Summary
TWGMonRecordedData(int rc)
          This is the constructor used to build the object for command timeout
TWGMonRecordedData(IntelByteBuffer iBuf)
          This is the constructor for building the object from a byte buffer
TWGMonRecordedData(int rc, long time)
          This is the constructor used to build the object without data
TWGMonRecordedData(long time)
          This is the constructor used to build the object with just the timestamp
TWGMonRecordedData(com.tivoli.twg.monitor.TWGMonRecordedInfo recInfo)
          This is the constructor for building the object
 
Method Summary
 void addPoint(long timeStamp, TWGMonCurrentData newPoint)
          Add a recorded data point to the list.
 void addPoint(TWGMonCurrentData newPoint)
          Add a recorded data point to the list.
 long[] getAllKeys()
          get all the keys (time instances) to map the data.
 TWGMonCurrentData[] getAllObjects()
          get all the data objects.
 int getDataType()
          Gets the data type for the recorded data
 int getIntelByteBufferSize()
          Determines and returns the IntelByteBuffer size requirment for the object the method is called on
 TWGMonCurrentData getPoint(long timeStamp)
          Get a recorded data point from the list.
 int getPointCount()
          get count of number of recorded points in the list.
 int getRC()
          get the return code for this list
 com.tivoli.twg.monitor.TWGMonRecordedInfo getRecInfo()
          get the RecordedInfo refernce
 long getTimeStamp()
          get the new timeStamp to use for the next getRecordedData() call
 java.util.Enumeration getTimeStamps()
          Gets an enumeration of time stamps in the list.
 void mergeWith(TWGMonRecordedData newList)
          Combine the contents of another point list with this list.
 void setRC(int parm)
          set the return code for this list
 void setRecInfo(com.tivoli.twg.monitor.TWGMonRecordedInfo parm)
          set the RecordedInfo variable
 void setRecordedTable(LongKeyTable parm)
          set the LongKeyTable variable to a new, filled in table
 void setTimeStamp(long parm)
          set the new timeStamp for this active attribute
 java.lang.String toString()
          get a textual string that can be dumped that describes the list and its contents
 java.lang.String toStringPoints()
          get a textual string that can be dumped that only outputs the data points
 IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
          Writes the class variables into the passed in IntelByteBuffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TWGMonRecordedData

public TWGMonRecordedData(com.tivoli.twg.monitor.TWGMonRecordedInfo recInfo)
This is the constructor for building the object

Parameters:
recInfo - recorded info for this object

TWGMonRecordedData

public TWGMonRecordedData(int rc)
This is the constructor used to build the object for command timeout

Parameters:
rc - return code to reflect for this object when data is not available due to a timeout

TWGMonRecordedData

public TWGMonRecordedData(int rc,
                          long time)
This is the constructor used to build the object without data

Parameters:
rc - return code to reflect for this object when data is not available
time - timestamp for this object

TWGMonRecordedData

public TWGMonRecordedData(long time)
This is the constructor used to build the object with just the timestamp


TWGMonRecordedData

public TWGMonRecordedData(IntelByteBuffer iBuf)
                   throws TWGByteStreamException
This is the constructor for building the object from a byte buffer

Parameters:
iBuf - contains the byte stream to rebuild the object with
Throws:
TWGByteStreamException - thrown to indicate that the byte buffer being used build the object contained improper data
Method Detail

getIntelByteBufferSize

public int getIntelByteBufferSize()
Determines and returns the IntelByteBuffer size requirment for the object the method is called on

Returns:
int containing size of buffer needed

writeIntelByteBuffer

public IntelByteBuffer writeIntelByteBuffer(IntelByteBuffer iBuf)
Writes the class variables into the passed in IntelByteBuffer. the getIntelByteBufferSize method should be called first to find the size of the buffer that is required.

Parameters:
iBuf - byte buffer to save state of object into
Returns:
IntelByteBuffer containing passed in IntelByteBuffer with values set

getRC

public int getRC()
get the return code for this list

Returns:
int the results code for this set of recorded data points

getTimeStamp

public long getTimeStamp()
get the new timeStamp to use for the next getRecordedData() call

Returns:
int the results code for this set of recorded data points

getRecInfo

public com.tivoli.twg.monitor.TWGMonRecordedInfo getRecInfo()
get the RecordedInfo refernce

Returns:
reference to our RecordedInfo

getPoint

public TWGMonCurrentData getPoint(long timeStamp)
Get a recorded data point from the list.

Parameters:
timeStamp - time stamp of data point to retreive

getPointCount

public int getPointCount()
get count of number of recorded points in the list.

Returns:
int with number of elements in this list

getAllKeys

public long[] getAllKeys()
get all the keys (time instances) to map the data.

Returns:
long[] containing all time keys in msec.

getAllObjects

public TWGMonCurrentData[] getAllObjects()
get all the data objects.

Returns:
TWGMonCurrentData[] containing array of data points in recorded data

getTimeStamps

public java.util.Enumeration getTimeStamps()
Gets an enumeration of time stamps in the list.

Returns:
enumeration has enumerated list of time stamps from the list

getDataType

public int getDataType()
Gets the data type for the recorded data

Returns:
int data type for this recorded data

setRC

public void setRC(int parm)
set the return code for this list

Parameters:
parm - result code fro these recorded data points

setRecInfo

public void setRecInfo(com.tivoli.twg.monitor.TWGMonRecordedInfo parm)
set the RecordedInfo variable

Parameters:
parm - reference to a RecordedInfo object

setRecordedTable

public void setRecordedTable(LongKeyTable parm)
set the LongKeyTable variable to a new, filled in table

Parameters:
parm - reference to a setup table object

setTimeStamp

public void setTimeStamp(long parm)
set the new timeStamp for this active attribute

Parameters:
parm - timeStamp to use for next get call

addPoint

public void addPoint(long timeStamp,
                     TWGMonCurrentData newPoint)
Add a recorded data point to the list. If it already exists in the list of points, update it.

Parameters:
timeStamp - time stamp of new data point
newPoint - new recorded data point to save

addPoint

public void addPoint(TWGMonCurrentData newPoint)
Add a recorded data point to the list. If it already exists in the list of points, update it.

Parameters:
newPoint - new recorded data point to save

mergeWith

public void mergeWith(TWGMonRecordedData newList)
Combine the contents of another point list with this list.


toStringPoints

public java.lang.String toStringPoints()
get a textual string that can be dumped that only outputs the data points

Returns:
String with formated information describing the contents of the object

toString

public java.lang.String toString()
get a textual string that can be dumped that describes the list and its contents

Returns:
String with formated information describing the contents of the object