SMILA 1.0 API documentation

org.eclipse.smila.connectivity.framework.performancecounters
Class ConnectivityPerformanceCounterHelperBase<AgentType extends ConnectivityPerformanceAgent>

java.lang.Object
  extended by org.eclipse.smila.connectivity.framework.performancecounters.ConnectivityPerformanceCounterHelperBase<AgentType>
Type Parameters:
AgentType - real agent class
Direct Known Subclasses:
AgentControllerPerformanceCounterHelper, AgentPerformanceCounterHelper, CrawlerControllerPerformanceCounterHelper, CrawlerPerformanceCounterHelper

public abstract class ConnectivityPerformanceCounterHelperBase<AgentType extends ConnectivityPerformanceAgent>
extends java.lang.Object

The Class ConnectivityPerformanceCounterHelperBase.


Field Summary
protected  java.lang.Class<AgentType> _agentClass
          The _agent class.
protected  CrawlerControllerPerformanceAgent _controllerAgent
          The _controller agent.
protected  AgentType _instanceAgent
          The _instance agent.
protected  Log _log
          The _log.
protected  AgentType _typeAgent
          The _type agent.
 
Constructor Summary
ConnectivityPerformanceCounterHelperBase(DataSourceConnectionConfig configuration, int hashCode, java.lang.Class<AgentType> agentClass)
          Instantiates a new crawler performance counter helper.
 
Method Summary
 void addCriticalException(java.lang.Throwable ex)
          Adds the critical exception.
 void addException(java.lang.Throwable ex)
          Adds the exception.
 void addException(java.lang.Throwable exception, boolean isCritical)
          Adds the exception.
protected abstract  java.lang.String getdateConnectionIdSuffix()
           
 AgentType getInstanceAgent()
           
protected abstract  java.lang.String getPerformanceAgentCategory()
           
protected abstract  java.lang.String getPerformanceAgentLocation()
          Sets the crawler start date.
 void increment(java.lang.String name)
          Increment.
 void incrementAttachmentBytes(long value)
          Increment attachment bytes.
 void incrementBy(java.lang.String name, long value)
          Increment by.
 void incrementDeltaIndices()
          Increment delta indices.
 void incrementDeltaIndicesBy(long value)
          Increment delta indices by.
 void incrementRecords()
          Increment records.
 void incrementRecordsBy(long value)
          Increment records by.
protected abstract  AgentType initAgent(ManagementAgentLocation location)
          Inits the agent.
 void setEndDate(java.util.Date endDate)
          Sets the end date.
 void setImportRunId(java.lang.String importRunId)
           
 void setJobName(java.lang.String jobName)
          Sets the jobName.
 void setStartDate(java.util.Date date)
          Sets the start date.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_log

protected Log _log
The _log.


_controllerAgent

protected CrawlerControllerPerformanceAgent _controllerAgent
The _controller agent.


_typeAgent

protected final AgentType extends ConnectivityPerformanceAgent _typeAgent
The _type agent.


_instanceAgent

protected final AgentType extends ConnectivityPerformanceAgent _instanceAgent
The _instance agent. (single crawler run)


_agentClass

protected final java.lang.Class<AgentType extends ConnectivityPerformanceAgent> _agentClass
The _agent class. ("Total" crawler runs)

Constructor Detail

ConnectivityPerformanceCounterHelperBase

public ConnectivityPerformanceCounterHelperBase(DataSourceConnectionConfig configuration,
                                                int hashCode,
                                                java.lang.Class<AgentType> agentClass)
Instantiates a new crawler performance counter helper.

Parameters:
configuration - the configuration
hashCode - the hash code
agentClass - the agent class
Method Detail

getInstanceAgent

public AgentType getInstanceAgent()
Returns:
counters of single crawler run.

getPerformanceAgentLocation

protected abstract java.lang.String getPerformanceAgentLocation()
Sets the crawler start date.

Returns:
the performance agent location.

getPerformanceAgentCategory

protected abstract java.lang.String getPerformanceAgentCategory()
Returns:
the performance agent category.

getdateConnectionIdSuffix

protected abstract java.lang.String getdateConnectionIdSuffix()
Returns:
the data connection id suffix.

setStartDate

public void setStartDate(java.util.Date date)
Sets the start date.

Parameters:
date - the new start date

setJobName

public void setJobName(java.lang.String jobName)
Sets the jobName.

Parameters:
jobName - the new job Name

setEndDate

public void setEndDate(java.util.Date endDate)
Sets the end date.

Parameters:
endDate - the new end date

initAgent

protected abstract AgentType initAgent(ManagementAgentLocation location)
Inits the agent.

Parameters:
location - the location
Returns:
the agent type

incrementDeltaIndices

public void incrementDeltaIndices()
Increment delta indices.


incrementDeltaIndicesBy

public void incrementDeltaIndicesBy(long value)
Increment delta indices by.

Parameters:
value - the value

incrementAttachmentBytes

public void incrementAttachmentBytes(long value)
Increment attachment bytes.

Parameters:
value - the value

incrementRecords

public void incrementRecords()
Increment records.


incrementRecordsBy

public void incrementRecordsBy(long value)
Increment records by.

Parameters:
value - the value

increment

public void increment(java.lang.String name)
Increment.

Parameters:
name - the name

incrementBy

public void incrementBy(java.lang.String name,
                        long value)
Increment by.

Parameters:
name - the name
value - the value

addException

public void addException(java.lang.Throwable ex)
Adds the exception.

Parameters:
ex - the ex

addCriticalException

public void addCriticalException(java.lang.Throwable ex)
Adds the critical exception.

Parameters:
ex - the ex

addException

public void addException(java.lang.Throwable exception,
                         boolean isCritical)
Adds the exception.

Parameters:
exception - the exception
isCritical - the is critical

setImportRunId

public void setImportRunId(java.lang.String importRunId)
Parameters:
importRunId - the importRunId to set.

SMILA 1.0 API documentation