|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgcspy.utils.Verbose
gcspy.tools.FileTrace
public class FileTrace
Contains facilities to store / retrieve traces to / from files
| Field Summary | |
|---|---|
static int |
COMPRESSION_GZIP
Use gzip format |
static int |
COMPRESSION_NONE
No compression |
static int |
COMPRESSION_ZIP
Use zip format |
protected java.lang.String |
fileName
The name of the file containng the trace |
| Fields inherited from class gcspy.utils.Verbose |
|---|
verbose |
| Constructor Summary | |
|---|---|
FileTrace(java.lang.String fileName,
boolean verbose)
Create a new FileTrace with default buffer length |
|
FileTrace(java.lang.String fileName,
int bufferLen,
boolean verbose)
Create a new FileTrace with default buffer length and compression not set |
|
FileTrace(java.lang.String fileName,
int bufferLen,
boolean verbose,
int compression)
Create a new FileTrace with default buffer length with compression not set |
|
| Method Summary | |
|---|---|
void |
close()
Close the input / output |
protected void |
control(int spaceID,
byte[] control)
Handle a space's controls |
BufferedInput |
createBufferedInput()
Create a new buffered input |
BufferedOutput |
createBufferedOutput()
Create a buffered output |
Space |
createSpace()
Create a new space |
void |
done(int len)
Complete writing a stream |
protected void |
event(int eventID,
int elapsedTime,
int compensationTime)
Handle an event |
protected void |
eventCount(int[] counts)
Handle event counts |
protected java.lang.String |
getCompressionType()
Get the files compression type (e.g. |
void |
parse()
Parse input |
void |
setupInput()
Set up the input |
void |
setupOutput()
Set up the output |
protected void |
space(ServerSpace space)
Handle a space |
protected void |
spaceInfo(int spaceID,
java.lang.String spaceInfo)
Handle space information |
protected void |
stream(int spaceID,
int streamID,
java.lang.Object data,
int[] summary)
Handle a stream's data and dummary values for a stream |
void |
writeControl(int spaceID,
byte[] control)
Write the controls for a space |
void |
writeEvent(int eventID,
int elapsedTime,
int compensationTime)
Write an event |
void |
writeEventCount(int[] counts)
Write event counts |
void |
writeSpace(Space space)
Write a space |
void |
writeSpaceInfo(int spaceID,
java.lang.String spaceInfo)
Write the space inforrmation for a space |
void |
writeStream(int spaceID,
int streamID,
java.lang.Object data,
int[] summary)
Write a stream |
| Methods inherited from class gcspy.utils.Verbose |
|---|
print, println, println, setVerbose, verbose |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COMPRESSION_NONE
public static final int COMPRESSION_GZIP
public static final int COMPRESSION_ZIP
protected java.lang.String fileName
| Constructor Detail |
|---|
public FileTrace(java.lang.String fileName,
boolean verbose)
fileName - The name of the fileverbose - SHould we be verbose?
public FileTrace(java.lang.String fileName,
int bufferLen,
boolean verbose)
fileName - The name of the filebufferLen - The length of the bufferverbose - SHould we be verbose?
public FileTrace(java.lang.String fileName,
int bufferLen,
boolean verbose,
int compression)
fileName - The name of the filebufferLen - The length of the bufferverbose - SHould we be verbose?compression - The compression type| Method Detail |
|---|
protected java.lang.String getCompressionType()
public BufferedOutput createBufferedOutput()
throws java.io.IOException
createBufferedOutput in interface OutputGeneratorjava.io.IOException
public void done(int len)
throws java.io.IOException
done in interface OutputGeneratorlen - the lenght of the stream
java.io.IOException
public void writeStream(int spaceID,
int streamID,
java.lang.Object data,
int[] summary)
spaceID - the space's IDstreamID - The stream's IDdata - The stream datasummary - The stream's summary values
public void writeControl(int spaceID,
byte[] control)
spaceID - The space's IDcontrol - The controlspublic void writeEventCount(int[] counts)
counts - The counts
public void writeEvent(int eventID,
int elapsedTime,
int compensationTime)
eventID - The event's iDelapsedTime - The eleapsed time for the eventcompensationTime - The compensation time
public void writeSpaceInfo(int spaceID,
java.lang.String spaceInfo)
spaceID - the space's IDspaceInfo - the space informationpublic void writeSpace(Space space)
space - The space
public BufferedInput createBufferedInput()
throws java.io.IOException
createBufferedInput in interface InputGeneratorjava.io.IOExceptionpublic Space createSpace()
createSpace in interface InputGenerator
protected void stream(int spaceID,
int streamID,
java.lang.Object data,
int[] summary)
throws java.io.IOException
spaceID - The space's IDstreamID - The stream's IDdata - The stream's datasummary - The summary values
java.io.IOException
protected void control(int spaceID,
byte[] control)
throws java.io.IOException
spaceID - The space's IDcontrol - The controls
java.io.IOException
protected void eventCount(int[] counts)
throws java.io.IOException
counts - The event counts
java.io.IOException
protected void event(int eventID,
int elapsedTime,
int compensationTime)
throws java.io.IOException
eventID - The event's IDelapsedTime - The elapsed time for the eventcompensationTime - Its compensation time
java.io.IOException
protected void spaceInfo(int spaceID,
java.lang.String spaceInfo)
throws java.io.IOException
spaceID - The space's IDspaceInfo - Its space information
java.io.IOException
protected void space(ServerSpace space)
throws java.io.IOException
space - The space
java.io.IOException
public void parse()
throws java.io.IOException
java.io.IOExceptionpublic void setupInput()
public void setupOutput()
public void close()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||