|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bankframe.services.trace.TimingPointUtil
This class provides utilities to work with timing points
Field Summary | |
static TimingPoint[] |
buffer
The buffer that holds each timing point |
static int |
bufferSize
This maintains the number of elements in the buffer |
static int |
counter
|
static boolean |
customRecordingEnabled
|
static boolean |
doSummary
If this flag is true then a summary is recorded along with the timing points when recording them to disk |
static boolean |
enabled
This determine whether timing points are enabled, this is set to false by default |
static java.util.Vector |
enabledSubsystems
This vector will hold all the substems that tming points are enabled for |
static java.lang.String |
fileName
This is the file name that the buffer will be cleared to |
static java.lang.String[] |
format
This determine if each fill of the buffer should be outputted to the set file. |
static boolean |
hostRecordingEnabled
|
static int |
idCounter
|
static int |
MAJORTYPE_CUSTOM
|
static java.lang.String |
MAJORTYPE_CUSTOM_STRING
|
static int |
MAJORTYPE_HOST
|
static java.lang.String |
MAJORTYPE_HOST_STRING
|
static int |
MAJORTYPE_SERVLET
|
static java.lang.String |
MAJORTYPE_SERVLET_STRING
|
static int |
MAJORTYPE_TRANSACTIONHANDLER
|
static java.lang.String |
MAJORTYPE_TRANSACTIONHANDLER_STRING
|
static java.lang.String[] |
majorTypeStrings
|
static java.io.PrintStream |
outputPrintStream
This is the printstream that is used when the buffer is cleared. |
static boolean |
serverInstanceFileEnabled
|
static boolean |
servletRecordingEnabled
|
static java.lang.String |
SUBSYSTEMS_PREFIX
This is the index in the BankFrameResource.properties file that identifies the subsystem to record for |
static TimingPointAnalyzer |
timingPointAnalyzer
This class is the class which is used to analyze each timing point |
static java.util.Hashtable |
timingPointNames
This hashtable will store name and timing points to allows timing points to be exited from within other classes without having to maintain a reference to that timing point |
static boolean |
transactionHandlerRecordingEnabled
|
static java.util.Vector |
types
This vector holds all the created type during the existence of this server |
static boolean |
writeToFile
|
Constructor Summary | |
TimingPointUtil()
|
Method Summary | |
static void |
addSubsystem(java.lang.String subsystem)
This method will add a subsystem to the list of subsytems that should be recorded |
static void |
flush()
This method will clear the timing points buffer |
static TimingPointAnalyzer |
getAnalyzerClassName()
This method return the analyser object used to do the custom analysing |
static int |
getBufferSize()
This method will tell the length of the timing point buffer |
static boolean |
getCustomRecording()
This method gets the utils to record timings in the custom code |
static boolean |
getDoSummary()
This method tell if summary information is to be included in the log |
static java.util.Vector |
getEnabledSubsystems()
This method gets all the enabled subsystems |
static java.lang.String |
getFileName()
This method will return the name of the log file that the timing point results are written to |
static java.lang.String[] |
getFormat()
This method the String Array holding the format of the TimingPoint |
static boolean |
getHostRecording()
This method will tell if host recording is enabled |
static java.lang.String |
getMajorTypeString(int majorType)
This method will get the String that corresponds to the given major type |
static int |
getOrCreateType(java.lang.String typeString)
This method creates the given type if on does not exist and returns the type id or just returns the type id if it already exists |
static boolean |
getServletRecording()
This method will tell if servlet recording is enabled |
static boolean |
getTransactionHandlerRecording()
This method will tell if transaction handler recording is enabled |
static java.lang.String |
getType(int typeId)
This method will determine if the /** This method will get the String that corresponds to the given type |
static boolean |
getWriteTimingPointsToDisk()
This method will get whether the timing points results are written to disk |
static boolean |
isEnabled()
This method determines whether or not to record timing points |
static boolean |
isSubsystemEnabled(java.lang.String subsystem)
This method determines in the timing points are enabled for a given major type |
static boolean |
isWriteToFile()
|
static void |
record(TimingPoint tp)
This method will recored a given timing point by adding it to the internal buffer |
static boolean |
removeSubsystem(java.lang.String subsystem)
This method will remove the given subsystem if it exists in the list |
static void |
report()
This method will write the timing points store in the buffer to the printStream of the specified fileName |
static void |
report(java.io.PrintStream ps)
|
static void |
setAnalyzerClassName(TimingPointAnalyzer value)
This method defines an external analyser class that allows additional processing to be done on the timing point |
static void |
setBufferSize(int size)
This sets the size of the buffer to a new size. |
static void |
setCustomRecording(boolean value)
This method set the utils to record timings in the custom code |
static void |
setDoSummary(boolean value)
This method will set whether summaries are recorded |
static void |
setEnabled(boolean newEnabled)
This method will switch the timing point service on and off |
static void |
setFileName(java.lang.String name)
This method will change the file that the timing point details are logged to If timingpoints are disabled, or writeToFile is false, then the file is not created. |
static void |
setHostRecording(boolean value)
This method set the utils to record timings in the host code |
static void |
setPrintStream(java.io.PrintStream value)
This method sets the utils to output to the given printStream object |
static void |
setServletRecording(boolean value)
This method set the utils to record timings in the servlet code |
static void |
setTransactionHandlerRecording(boolean value)
This method sets the utils to record timings in the transaction handler code |
static void |
setWriteTimingPointsToDisk(boolean value)
This method will set whether timing points are recored on disk |
static void |
setWriteToFile(boolean val)
This method will set whether to recored the buffer to a file |
static java.lang.String |
stringRepresentation()
This displays a string representation of the setting for timing points in MCA |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.util.Hashtable timingPointNames
public static final java.lang.String SUBSYSTEMS_PREFIX
public static java.util.Vector enabledSubsystems
public static boolean doSummary
public static int bufferSize
public static java.lang.String fileName
public static TimingPointAnalyzer timingPointAnalyzer
public static TimingPoint[] buffer
public static java.io.PrintStream outputPrintStream
public static java.util.Vector types
public static boolean enabled
public static java.lang.String[] format
public static boolean serverInstanceFileEnabled
public static boolean writeToFile
public static int counter
public static int idCounter
public static boolean customRecordingEnabled
public static boolean hostRecordingEnabled
public static final int MAJORTYPE_SERVLET
public static final int MAJORTYPE_HOST
public static final int MAJORTYPE_TRANSACTIONHANDLER
public static final int MAJORTYPE_CUSTOM
public static final java.lang.String MAJORTYPE_SERVLET_STRING
public static final java.lang.String MAJORTYPE_HOST_STRING
public static final java.lang.String MAJORTYPE_TRANSACTIONHANDLER_STRING
public static final java.lang.String MAJORTYPE_CUSTOM_STRING
public static final java.lang.String[] majorTypeStrings
public static boolean servletRecordingEnabled
public static boolean transactionHandlerRecordingEnabled
Constructor Detail |
public TimingPointUtil()
Method Detail |
public static void addSubsystem(java.lang.String subsystem)
subsystem
- to subsystem to addpublic static void flush()
public static TimingPointAnalyzer getAnalyzerClassName()
public static java.lang.String[] getFormat()
public static int getBufferSize()
public static boolean getDoSummary()
public static java.util.Vector getEnabledSubsystems()
public static java.lang.String getFileName()
public static int getOrCreateType(java.lang.String typeString)
typeString
- the Type string to get or create
public static java.lang.String getType(int typeId)
typeId
- the major type
public static boolean isSubsystemEnabled(java.lang.String subsystem)
public static boolean isEnabled()
public static boolean isWriteToFile()
public static void record(TimingPoint tp)
tp
- the timing point to recordpublic static boolean removeSubsystem(java.lang.String subsystem)
subsystem
- to subsystem to attempt to remove
public static void report()
public static void report(java.io.PrintStream ps)
public static void setAnalyzerClassName(TimingPointAnalyzer value)
value
- true(on)/false(off)public static void setBufferSize(int size)
size
- The new buffer sizepublic static void setDoSummary(boolean value)
value
- Booleanpublic static void setEnabled(boolean newEnabled)
public static void setFileName(java.lang.String name) throws java.io.IOException
java.io.IOException
public static void setPrintStream(java.io.PrintStream value)
value
- the output printstreampublic static java.lang.String stringRepresentation()
public static void setWriteToFile(boolean val)
val
- The new write to file valuepublic static boolean getHostRecording()
public static java.lang.String getMajorTypeString(int majorType)
majorType
- the major type
public static boolean getServletRecording()
public static boolean getTransactionHandlerRecording()
public static boolean getWriteTimingPointsToDisk()
public static void setServletRecording(boolean value)
value
- true(on)/false(off)public static void setTransactionHandlerRecording(boolean value)
value
- true(on)/false(off)public static void setWriteTimingPointsToDisk(boolean value)
value
- Booleanpublic static void setCustomRecording(boolean value)
value
- true(on)/false(off)public static void setHostRecording(boolean value)
value
- true(on)/false(off)public static boolean getCustomRecording()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |