Class TraceRecord

    • Field Detail

      • indentLevels

        protected static Hashtable indentLevels
      • lastThread

        protected static long lastThread
      • Chars

        protected static final String[] Chars
      • types

        protected static final String[] types
      • BASE_INDENT

        protected static final StringBuffer BASE_INDENT
      • buffer

        protected byte[] buffer
      • nextEight

        protected byte[] nextEight
      • writePlatform

        protected BigInteger writePlatform
      • threadID

        protected long threadID
      • threadSyn1

        protected long threadSyn1
      • threadSyn2

        protected long threadSyn2
      • threadName

        protected String threadName
      • nextEntry

        protected long nextEntry
      • recordFinished

        protected boolean recordFinished
      • bufferSize

        protected int bufferSize
      • start

        protected long start
      • offset

        protected int offset
      • currentBuffer

        protected byte[] currentBuffer
      • currentOffset

        protected int currentOffset
      • currentTraceID

        protected int currentTraceID
      • currentLength

        protected int currentLength
      • currentTimeStamp

        protected BigInteger currentTimeStamp
      • wrapTimes

        protected Stack wrapTimes
      • longEntryTraceIDs

        protected Stack longEntryTraceIDs
      • notFormatted

        protected boolean notFormatted
      • headerSize

        protected int headerSize
    • Method Detail

      • initStatics

        protected static final void initStatics()
        Initializes static variables.

        This is called each time the TraceFormatter is started, from the initStatics() method in TraceFormat.java

      • getCurrentTimeStamp

        protected final BigInteger getCurrentTimeStamp()
        returns the latest time stamp read so far
        Parameters:
        info -
        Returns:
        a biginteger that is that timestamp
      • getNextRecord

        protected final TraceRecord getNextRecord()
        returns the latest time stamp read so far
        Parameters:
        info -
        Returns:
        a biginteger that is that timestamp
      • processNextEntryHeader

        protected final int processNextEntryHeader​(byte[] entry,
                                                   int start)
                                            throws IOException
        sets up current* fields for later formatting
        Throws:
        IOException
      • formatCurrentEntry

        protected final String formatCurrentEntry()
                                           throws IOException
        return: the formatted trace entry.
        Throws:
        IOException
      • release

        protected final void release()
        release the record data for this TraceRecord so GC can do it's stuff
      • compareTo

        public final int compareTo​(Object other)
        compares this TraceRecord to another based on the time stamp.
        Specified by:
        compareTo in interface Comparable
        Parameters:
        other - the object to be compared.
        Returns:
        an int which is negative if this entry is older than other, 0, if they are the same age, and positive if this is newer
      • getIndent

        protected static final StringBuffer getIndent​(String threadID,
                                                      boolean doIndent)
        sets the indent associated with a given thread id
        Parameters:
        threadid - a string that is the id of the thread which is to be indented
        Returns:
        a stringbuffer of spaces that is the amount to indent the entry associates with the specified thread id
      • setIndent

        protected static final void setIndent​(String threadID,
                                              StringBuffer buffer)
        sets the indent associated with a given thread id
        Parameters:
        threadid - a string that is the id of the thread which is to have its indent level set
        buffer - a stringbuffer of spaces that is the amount to indent the entries associates with the specified thread id