Package com.jalios.jcms.analytics
Class AbstractAnalyzeJob
- java.lang.Object
-
- com.jalios.jcms.analytics.AbstractAnalyzeJob
-
- All Implemented Interfaces:
java.util.concurrent.Callable<java.lang.Boolean>
- Direct Known Subclasses:
AnalyzeJob,PeriodAnalyzeJob
public abstract class AbstractAnalyzeJob extends java.lang.Object implements java.util.concurrent.Callable<java.lang.Boolean>
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_IDLE_PERIODprotected static intDEFAULT_MAX_ITERATION_PER_TRANSACTIONprotected static java.lang.StringIDLE_PROPERTYprotected booleanisTraceEnabledprotected static java.lang.StringMAX_ITERATION_PER_TRANSACTION_PROPERTY
-
Constructor Summary
Constructors Constructor Description AbstractAnalyzeJob(Interval interval, StatisticContext context, java.util.List<AbstractStatisticAgent> agentList, ProgressListener listener)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Booleancall()java.util.List<AbstractStatisticAgent>getAgentList()StatisticContextgetContext()protected intgetIdlePeriod()ProgressListenergetListener()protected intgetMaxIterationPerTransaction()protected static AbstractReportMetricgetReportMetric(Workspace analyzedWS, StatisticContext context, java.lang.Class<? extends AbstractReportMetric> clazz)protected static AbstractReportMetricgetReportMetric(Workspace analyzedWS, StatisticContext context, java.util.Date startDate, java.util.Date endDate, java.lang.Class<? extends AbstractReportMetric> clazz)protected voidreadEvents(AbstractEventDataProvider eventDataProvider)ReadEventDatafrom a file and call every agent to process itvoidsetAgentList(java.util.List<AbstractStatisticAgent> agentList)voidsetContext(StatisticContext context)voidsetListener(ProgressListener listener)
-
-
-
Field Detail
-
DEFAULT_MAX_ITERATION_PER_TRANSACTION
protected static final int DEFAULT_MAX_ITERATION_PER_TRANSACTION
- See Also:
- Constant Field Values
-
DEFAULT_IDLE_PERIOD
protected static final int DEFAULT_IDLE_PERIOD
- See Also:
- Constant Field Values
-
MAX_ITERATION_PER_TRANSACTION_PROPERTY
protected static final java.lang.String MAX_ITERATION_PER_TRANSACTION_PROPERTY
- See Also:
- Constant Field Values
-
IDLE_PROPERTY
protected static final java.lang.String IDLE_PROPERTY
- See Also:
- Constant Field Values
-
isTraceEnabled
protected boolean isTraceEnabled
-
-
Constructor Detail
-
AbstractAnalyzeJob
public AbstractAnalyzeJob(Interval interval, StatisticContext context, java.util.List<AbstractStatisticAgent> agentList, ProgressListener listener)
-
-
Method Detail
-
getContext
public StatisticContext getContext()
-
setContext
public void setContext(StatisticContext context)
-
getAgentList
public java.util.List<AbstractStatisticAgent> getAgentList()
-
setAgentList
public void setAgentList(java.util.List<AbstractStatisticAgent> agentList)
-
getListener
public ProgressListener getListener()
-
setListener
public void setListener(ProgressListener listener)
-
call
public java.lang.Boolean call()
- Specified by:
callin interfacejava.util.concurrent.Callable<java.lang.Boolean>
-
readEvents
protected void readEvents(AbstractEventDataProvider eventDataProvider) throws java.lang.Exception
ReadEventDatafrom a file and call every agent to process it- Parameters:
eventDataProvider- theAbstractEventDataProviderto read from- Throws:
java.lang.Exception- Exception thrown when reading the file
-
getReportMetric
protected static AbstractReportMetric getReportMetric(Workspace analyzedWS, StatisticContext context, java.lang.Class<? extends AbstractReportMetric> clazz) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
getReportMetric
protected static AbstractReportMetric getReportMetric(Workspace analyzedWS, StatisticContext context, java.util.Date startDate, java.util.Date endDate, java.lang.Class<? extends AbstractReportMetric> clazz) throws java.lang.ReflectiveOperationException
- Throws:
java.lang.ReflectiveOperationException
-
getIdlePeriod
protected int getIdlePeriod()
-
getMaxIterationPerTransaction
protected int getMaxIterationPerTransaction()
-
-