Class TransformerStatisticsImpl
- java.lang.Object
-
- org.alfresco.repo.content.transform.TransformerStatisticsImpl
-
- All Implemented Interfaces:
TransformerStatistics
public class TransformerStatisticsImpl extends java.lang.Object implements TransformerStatistics
Implementation of aTransformerStatistics.- Author:
- Alan Davis
-
-
Constructor Summary
Constructors Constructor Description TransformerStatisticsImpl(org.alfresco.service.cmr.repository.MimetypeService mimetypeService, java.lang.String sourceMimetype, java.lang.String targetMimetype, ContentTransformer transformer, TransformerStatistics parent, long errorTime, long initialAverageTime, long initialCount)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetAverageTime()longgetCount()longgetErrorCount()java.lang.StringgetSourceExt()java.lang.StringgetTargetExt()java.lang.StringgetTransformerName()booleanisSummary()voidrecordError(long transformationTime)Adds 1 to the error count of this TransformationData and its parents.voidrecordTime(long transformationTime)voidsetAverageTime(long averageTime)voidsetCount(long count)voidsetErrorCount(long errorCount)
-
-
-
Constructor Detail
-
TransformerStatisticsImpl
public TransformerStatisticsImpl(org.alfresco.service.cmr.repository.MimetypeService mimetypeService, java.lang.String sourceMimetype, java.lang.String targetMimetype, ContentTransformer transformer, TransformerStatistics parent, long errorTime, long initialAverageTime, long initialCount)
-
-
Method Detail
-
getSourceExt
public java.lang.String getSourceExt()
- Specified by:
getSourceExtin interfaceTransformerStatistics- Returns:
- the extension of the source mimetype of the transformer.
-
getTargetExt
public java.lang.String getTargetExt()
- Specified by:
getTargetExtin interfaceTransformerStatistics- Returns:
- the extension of the target mimetype of the transformer.
-
getTransformerName
public java.lang.String getTransformerName()
- Specified by:
getTransformerNamein interfaceTransformerStatistics- Returns:
- the name of the parent transformer.
-
recordTime
public void recordTime(long transformationTime)
- Specified by:
recordTimein interfaceTransformerStatistics- Parameters:
transformationTime- to be added to this TransformationData and its parents.
-
recordError
public void recordError(long transformationTime)
Description copied from interface:TransformerStatisticsAdds 1 to the error count of this TransformationData and its parents.- Specified by:
recordErrorin interfaceTransformerStatistics
-
getCount
public long getCount()
- Specified by:
getCountin interfaceTransformerStatistics- Returns:
- the number of time the transformer has been called.
-
setCount
public void setCount(long count)
- Specified by:
setCountin interfaceTransformerStatistics- Parameters:
count- overrides the number of time the transformer has been called.
-
getErrorCount
public long getErrorCount()
- Specified by:
getErrorCountin interfaceTransformerStatistics- Returns:
- the number of time the transformer has failed.
-
setErrorCount
public void setErrorCount(long errorCount)
- Specified by:
setErrorCountin interfaceTransformerStatistics- Parameters:
errorCount- overrides the number of time the transformer has failed.
-
getAverageTime
public long getAverageTime()
- Specified by:
getAverageTimein interfaceTransformerStatistics- Returns:
- the average time taken by the the transformer.
-
setAverageTime
public void setAverageTime(long averageTime)
- Specified by:
setAverageTimein interfaceTransformerStatistics- Parameters:
averageTime- overrides the average time taken by the the transformer.
-
isSummary
public boolean isSummary()
- Specified by:
isSummaryin interfaceTransformerStatistics- Returns:
trueif this is the summary of all transformations done by a transformer rather than just between two specific mimetypes.
-
-