|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bankframe.services.trace.TimingPointUtil
public class 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 Vector |
enabledSubsystems
This vector will hold all the substems that tming points are enabled for |
static String |
fileName
This is the file name that the buffer will be cleared to |
static 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 String |
MAJORTYPE_CUSTOM_STRING
|
static int |
MAJORTYPE_HOST
|
static String |
MAJORTYPE_HOST_STRING
|
static int |
MAJORTYPE_SERVLET
|
static String |
MAJORTYPE_SERVLET_STRING
|
static int |
MAJORTYPE_TRANSACTIONHANDLER
|
static String |
MAJORTYPE_TRANSACTIONHANDLER_STRING
|
static String[] |
majorTypeStrings
|
static PrintStream |
outputPrintStream
This is the printstream that is used when the buffer is cleared. |
static boolean |
serverInstanceFileEnabled
|
static boolean |
servletRecordingEnabled
|
static 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 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 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(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 Vector |
getEnabledSubsystems()
This method gets all the enabled subsystems |
static String |
getFileName()
This method will return the name of the log file that the timing point results are written to |
static 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 String |
getMajorTypeString(int majorType)
This method will get the String that corresponds to the given major type |
static int |
getOrCreateType(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 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(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(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(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(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(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 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 Hashtable timingPointNames
public static final String SUBSYSTEMS_PREFIX
public static Vector enabledSubsystems
public static boolean doSummary
public static int bufferSize
public static String fileName
public static TimingPointAnalyzer timingPointAnalyzer
public static TimingPoint[] buffer
public static PrintStream outputPrintStream
public static Vector types
public static boolean enabled
public static 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 String MAJORTYPE_SERVLET_STRING
public static final String MAJORTYPE_HOST_STRING
public static final String MAJORTYPE_TRANSACTIONHANDLER_STRING
public static final String MAJORTYPE_CUSTOM_STRING
public static final String[] majorTypeStrings
public static boolean servletRecordingEnabled
public static boolean transactionHandlerRecordingEnabled
Constructor Detail |
---|
public TimingPointUtil()
Method Detail |
---|
public static void addSubsystem(String subsystem)
subsystem
- to subsystem to addpublic static void flush()
public static TimingPointAnalyzer getAnalyzerClassName()
public static String[] getFormat()
public static int getBufferSize()
public static boolean getDoSummary()
public static Vector getEnabledSubsystems()
public static String getFileName()
public static int getOrCreateType(String typeString)
typeString
- the Type string to get or create
public static String getType(int typeId)
typeId
- the major type
public static boolean isSubsystemEnabled(String subsystem)
subsystem
- the major type to checkpublic static boolean isEnabled()
public static boolean isWriteToFile()
public static void record(TimingPoint tp)
tp
- the timing point to recordpublic static boolean removeSubsystem(String subsystem)
subsystem
- to subsystem to attempt to remove
public static void report()
public static void report(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)
newEnabled
- the new settingpublic static void setFileName(String name) throws IOException
name
- the new FileName
IOException
public static void setPrintStream(PrintStream value)
value
- the output printstreampublic static String stringRepresentation()
public static void setWriteToFile(boolean val)
val
- The new write to file valuepublic static boolean getHostRecording()
public static 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 |