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 int
DEFAULT_IDLE_PERIOD
protected static int
DEFAULT_MAX_ITERATION_PER_TRANSACTION
protected static java.lang.String
IDLE_PROPERTY
protected boolean
isTraceEnabled
protected static java.lang.String
MAX_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.Boolean
call()
java.util.List<AbstractStatisticAgent>
getAgentList()
StatisticContext
getContext()
protected int
getIdlePeriod()
ProgressListener
getListener()
protected int
getMaxIterationPerTransaction()
protected static AbstractReportMetric
getReportMetric(Workspace analyzedWS, StatisticContext context, java.lang.Class<? extends AbstractReportMetric> clazz)
protected static AbstractReportMetric
getReportMetric(Workspace analyzedWS, StatisticContext context, java.util.Date startDate, java.util.Date endDate, java.lang.Class<? extends AbstractReportMetric> clazz)
protected void
readEvents(AbstractEventDataProvider eventDataProvider)
ReadEventData
from a file and call every agent to process itvoid
setAgentList(java.util.List<AbstractStatisticAgent> agentList)
void
setContext(StatisticContext context)
void
setListener(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:
call
in interfacejava.util.concurrent.Callable<java.lang.Boolean>
-
readEvents
protected void readEvents(AbstractEventDataProvider eventDataProvider) throws java.lang.Exception
ReadEventData
from a file and call every agent to process it- Parameters:
eventDataProvider
- theAbstractEventDataProvider
to 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()
-
-