|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.groboutils.codecoverage.v2.logger.DirectoryChannelLogger
net.sourceforge.groboutils.codecoverage.v2.logger.CacheDirChannelLogger
This is the same as the DirectoryChannelLogger, except that the open files are cached for access.
Besides some other issues with this (see open bugs), it can cause issues if multiple loggers are trying to access the same file. This could happen if the CoverageLogger class is loaded by different class loaders; as a result, multiple CoverageLogger instances will be created, allowing for multiple channel loggers to write to the same area.
Field Summary |
Fields inherited from class net.sourceforge.groboutils.codecoverage.v2.logger.DirectoryChannelLogger |
baseDir, CLASS_LOG_EXTENTION |
Constructor Summary | |
CacheDirChannelLogger(java.io.File baseDir,
int cacheSize)
|
Method Summary | |
protected void |
addShutdownHook()
|
void |
cleanUpObject(java.lang.Object key,
java.lang.Object obj)
Called by HashCache when the given object is being removed from the cache. |
void |
cover(java.lang.String classSignature,
short methodIndex,
short markIndex)
Records a coverage of a marked bytecode instruction. |
java.lang.Object |
createObject(java.lang.Object key)
Called by the HashCache |
protected void |
finalize()
|
void |
run()
Called when the shutdown hook is called. |
Methods inherited from class net.sourceforge.groboutils.codecoverage.v2.logger.DirectoryChannelLogger |
createCoverString, getClassFile |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CacheDirChannelLogger(java.io.File baseDir, int cacheSize)
Method Detail |
public void cover(java.lang.String classSignature, short methodIndex, short markIndex)
cover
in interface IChannelLogger
cover
in class DirectoryChannelLogger
classSignature
- a signature of the class file being covered.
this signature includes the fully-qualified name of the class,
along with a checksum to uniquely identify it.methodIndex
- index for a method within the class. The meta-data
store will know how to translate the index to a method signature.markIndex
- the index of the bytecode instruction mark for this
particular channel.public void run()
run
in interface java.lang.Runnable
public java.lang.Object createObject(java.lang.Object key)
createObject
in interface HashCache.ObjectManager
key
- the key associated with the created object.
public void cleanUpObject(java.lang.Object key, java.lang.Object obj)
cleanUpObject
in interface HashCache.ObjectManager
key
- the key associated with the object.obj
- the object being cleaned up.protected void finalize() throws java.lang.Throwable
java.lang.Throwable
protected void addShutdownHook()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |