www.element4solution.com

e4s.util
Class E4ObjectCounter

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.util.E4ObjectCounter

public class E4ObjectCounter
extends E4Object

Counter for instanciated E4Objects. You can turn on or off the object counter here using the #setObjectCounter(boolean method. The object counter tracks the number of Objects (as beeing part of E4S or your E4S application) that are inherited by E4Object. This number will be incremented each time an object is instanciated but decremented when the finalize() operator is called. Please note, that almost all E4S classes are inherited from that E4Object class, by doing so you will get a complete picture of objects created but this also causes an overhead in performance.

See Also:
E4Object, e4s.util.E4Object#getObjectCounter(), e4s.util.E4Object#setObjectCounter(boolean), E4ModuleSystem.showE4Objects

Field Summary
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
E4ObjectCounter(java.lang.String classname)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void decrement()
           
 java.lang.String getClassname()
           
 long getCount()
           
 long getMax()
           
 java.util.Date getMaxTime()
          Get the Time where the maximum number of objects instanciated has become the maximum.
static E4ObjectCounter[] getObjectCounter()
          Get a count of E4S objects beeing instanciated by their classname.
 void increment()
           
static void registerObject(E4Object object)
           
static void requestObjectCounterTurnOn()
           
static void setObjectCounter(boolean mode, boolean clear)
          Turn the object counter on or off.
static void setObjectCounterByRequest()
          Internal Only.
static void unregisterObject(E4Object object)
           
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

E4ObjectCounter

public E4ObjectCounter(java.lang.String classname)
Method Detail

increment

public void increment()

decrement

public void decrement()

getClassname

public java.lang.String getClassname()

getCount

public long getCount()

getMax

public long getMax()

getMaxTime

public java.util.Date getMaxTime()
Get the Time where the maximum number of objects instanciated has become the maximum.

Returns:
the time

registerObject

public static void registerObject(E4Object object)

unregisterObject

public static void unregisterObject(E4Object object)

setObjectCounter

public static void setObjectCounter(boolean mode,
                                    boolean clear)
Turn the object counter on or off. The object counter tracks the number of Objects (as beeing part of E4S or your E4S application) created by their number. This number will be incremented each time an object is instanciated but decremented when the finalize() operator is called. Please note, that almost all E4S classes are inherited from that E4Object class, by doing so you will get a complete picture of objects created but this also causes an overhead in performance.

Parameters:
mode - true turns on the object count mechanism, false turns it off and deletes all previous stored informations.
See Also:
E4ObjectCounter, getObjectCounter()

setObjectCounterByRequest

public static void setObjectCounterByRequest()
Internal Only.


getObjectCounter

public static E4ObjectCounter[] getObjectCounter()
Get a count of E4S objects beeing instanciated by their classname.

Returns:
a sorted array of counter objects, one for each class instanciated
See Also:
#setObjectCounter(boolean)

requestObjectCounterTurnOn

public static void requestObjectCounterTurnOn()

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com