atg.service.datacollection
Class SQLTableLogger

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.service.datacollection.SQLTableLogger
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, LogListener, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, DataCollector, DataListener, Schedulable, java.util.EventListener
Direct Known Subclasses:
SQLTableSummaryLogger

Deprecated. replaced by JTSQLTableLogger

public class SQLTableLogger
extends GenericService
implements DataCollector, Schedulable, LogListener

A DataCollector that logs items to an SQL table. This collector supports receiving data from a DataListenerQueue. It supports flushing its data either based on a schedule (via the Schedulable interface) or an item threshold. For production systems it is recommended that a DataListerQueue and schedule based flushing be used.


Field Summary
static java.lang.String CLASS_VERSION
          Deprecated. Class version string
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
SQLTableLogger()
          Deprecated. Construct an SQLTableLogger
 
Method Summary
 void addDataItem(java.lang.Object pDataItem)
          Deprecated. Add the given data item to the aggregate
 void doStartService()
          Deprecated. Perform any necessary initializations to startup service.
If a schedule is provided, then it is started.
 void doStopService()
          Deprecated. Performs tasks required to shutdown service.
 void flush()
          Deprecated. Flush our data buffer by writing all of the data to the SQL table and resetting our internal state accordingly.
 int getBufferSize()
          Deprecated. Get property BufferSize
 long getConnectRetryInterval()
          Deprecated. Get property ConnectRetryInterval
 java.lang.Object[] getDataBuffer()
          Deprecated. Returns property DataBuffer
 int getDataItemCount()
          Deprecated. Returns property DataItemCount
 int getDataItemThreshold()
          Deprecated. Returns property DataItemThreshold
 java.lang.String getInsertSQL()
          Deprecated. Returns property InsertSQL
 JDBCConnectionPool getJDBCConnectionPool()
          Deprecated. Returns property JDBCConnectionPool
 java.lang.String getJobDescription()
          Deprecated. Returns property JobDescription
 java.lang.String getJobName()
          Deprecated. Returns property JobName
 long getLastConnectTime()
          Deprecated. Get property LastConnectTime
 java.lang.String getMetaDataCatalogName()
          Deprecated. Get the catalog name
 java.lang.String getMetaDataSchemaPattern()
          Deprecated. Get the schema name
 long getMinimumErrorReportInterval()
          Deprecated. Get property MinimumErrorReportInterval
 Schedule getSchedule()
          Deprecated. Returns property Schedule
 Scheduler getScheduler()
          Deprecated. Returns property Scheduler
 SQLColumnMapping[] getSQLColumnMappings()
          Deprecated. Returns property SQLColumnMappings
 java.lang.String getTableName()
          Deprecated. Returns property TableName
 java.lang.String getTablePrefix()
          Deprecated. Returns property TablePrefix
 int getTransactionSize()
          Deprecated. Get property TransactionSize
protected  java.lang.Object[] getValueArray(java.lang.Object pDataItem)
          Deprecated.  
 boolean isBlocking()
          Deprecated. Get property Blocking
 void logEvent(LogEvent pLogEvent)
          Deprecated. Log an event.
 void performScheduledTask(Scheduler pScheduler, ScheduledJob pJob)
          Deprecated. Callback method for the scheduler.
 void sanitizeSQLColumnMappings()
          Deprecated. Filter out invalid column mappings
 void setBlocking(boolean pBlocking)
          Deprecated. Set property Blocking
 void setBufferSize(int pBufferSize)
          Deprecated. Set property BufferSize, which may cause the buffer to be flushed and reconstructed.
 void setConnectRetryInterval(long pConnectRetryInterval)
          Deprecated. Set property ConnectRetryInterval
 void setDataItemThreshold(int pDataItemThreshold)
          Deprecated. Sets property DataItemThreshold
 void setJDBCConnectionPool(JDBCConnectionPool pJDBCConnectionPool)
          Deprecated. Sets property JDBCConnectionPool
 void setJobDescription(java.lang.String pJobDescription)
          Deprecated. Sets property JobDescription
 void setJobName(java.lang.String pJobName)
          Deprecated. Sets property JobName
 void setMetaDataCatalogName(java.lang.String pMetaDataCatalogName)
          Deprecated. The name of a catalog
 void setMetaDataSchemaPattern(java.lang.String pMetaDataSchemaPattern)
          Deprecated. Set the schema name
 void setMinimumErrorReportInterval(long pMinimumErrorReportInterval)
          Deprecated. Set property MinimumErrorReportInterval
 void setSchedule(Schedule pSchedule)
          Deprecated. Sets property Schedule
 void setScheduler(Scheduler pScheduler)
          Deprecated. Sets property Scheduler
 void setSQLColumnMappings(SQLColumnMapping[] pSQLColumnMappings)
          Deprecated. Sets property SQLColumnMappings
 void setTableName(java.lang.String pTableName)
          Deprecated. Sets property TableName
 void setTablePrefix(java.lang.String pTablePrefix)
          Deprecated. Sets property TablePrefix
 void setTransactionSize(int pTransactionSize)
          Deprecated. Set property TransactionSize
protected  void startScheduledJob()
          Deprecated. If we have a schedule, start scheduled job
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, getAbsoluteName, getAdminServlet, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Deprecated. 
Class version string

Constructor Detail

SQLTableLogger

public SQLTableLogger()
Deprecated. 
Construct an SQLTableLogger

Method Detail

getInsertSQL

public java.lang.String getInsertSQL()
Deprecated. 
Returns property InsertSQL


setScheduler

public void setScheduler(Scheduler pScheduler)
Deprecated. 
Sets property Scheduler


getScheduler

public Scheduler getScheduler()
Deprecated. 
Returns property Scheduler


setSchedule

public void setSchedule(Schedule pSchedule)
Deprecated. 
Sets property Schedule


getSchedule

public Schedule getSchedule()
Deprecated. 
Returns property Schedule


setJobName

public void setJobName(java.lang.String pJobName)
Deprecated. 
Sets property JobName


getJobName

public java.lang.String getJobName()
Deprecated. 
Returns property JobName


setJobDescription

public void setJobDescription(java.lang.String pJobDescription)
Deprecated. 
Sets property JobDescription


getJobDescription

public java.lang.String getJobDescription()
Deprecated. 
Returns property JobDescription


setJDBCConnectionPool

public void setJDBCConnectionPool(JDBCConnectionPool pJDBCConnectionPool)
Deprecated. 
Sets property JDBCConnectionPool


getJDBCConnectionPool

public JDBCConnectionPool getJDBCConnectionPool()
Deprecated. 
Returns property JDBCConnectionPool


getDataBuffer

public java.lang.Object[] getDataBuffer()
Deprecated. 
Returns property DataBuffer


getDataItemCount

public int getDataItemCount()
Deprecated. 
Returns property DataItemCount


setDataItemThreshold

public void setDataItemThreshold(int pDataItemThreshold)
Deprecated. 
Sets property DataItemThreshold


getDataItemThreshold

public int getDataItemThreshold()
Deprecated. 
Returns property DataItemThreshold


setTableName

public void setTableName(java.lang.String pTableName)
Deprecated. 
Sets property TableName


getTableName

public java.lang.String getTableName()
Deprecated. 
Returns property TableName


setSQLColumnMappings

public void setSQLColumnMappings(SQLColumnMapping[] pSQLColumnMappings)
Deprecated. 
Sets property SQLColumnMappings


getSQLColumnMappings

public SQLColumnMapping[] getSQLColumnMappings()
Deprecated. 
Returns property SQLColumnMappings


setBufferSize

public void setBufferSize(int pBufferSize)
Deprecated. 
Set property BufferSize, which may cause the buffer to be flushed and reconstructed.

Parameters:
pBufferSize - new value to set

getBufferSize

public int getBufferSize()
Deprecated. 
Get property BufferSize

Returns:
BufferSize

setTransactionSize

public void setTransactionSize(int pTransactionSize)
Deprecated. 
Set property TransactionSize

Parameters:
pTransactionSize - new value to set

getTransactionSize

public int getTransactionSize()
Deprecated. 
Get property TransactionSize

Returns:
TransactionSize

setBlocking

public void setBlocking(boolean pBlocking)
Deprecated. 
Set property Blocking

Parameters:
pBlocking - new value to set

isBlocking

public boolean isBlocking()
Deprecated. 
Get property Blocking

Returns:
Blocking

setConnectRetryInterval

public void setConnectRetryInterval(long pConnectRetryInterval)
Deprecated. 
Set property ConnectRetryInterval

Parameters:
pConnectRetryInterval - new value to set

getConnectRetryInterval

public long getConnectRetryInterval()
Deprecated. 
Get property ConnectRetryInterval

Returns:
ConnectRetryInterval

setMinimumErrorReportInterval

public void setMinimumErrorReportInterval(long pMinimumErrorReportInterval)
Deprecated. 
Set property MinimumErrorReportInterval

Parameters:
pMinimumErrorReportInterval - new value to set

getMinimumErrorReportInterval

public long getMinimumErrorReportInterval()
Deprecated. 
Get property MinimumErrorReportInterval

Returns:
MinimumErrorReportInterval

getLastConnectTime

public long getLastConnectTime()
Deprecated. 
Get property LastConnectTime

Returns:
LastConnectTime

setMetaDataCatalogName

public void setMetaDataCatalogName(java.lang.String pMetaDataCatalogName)
Deprecated. 
The name of a catalog

Parameters:
String - the name of a catalog

getMetaDataCatalogName

public java.lang.String getMetaDataCatalogName()
Deprecated. 
Get the catalog name

Returns:
the catalog name

setMetaDataSchemaPattern

public void setMetaDataSchemaPattern(java.lang.String pMetaDataSchemaPattern)
Deprecated. 
Set the schema name

Parameters:
String - the schema name

getMetaDataSchemaPattern

public java.lang.String getMetaDataSchemaPattern()
Deprecated. 
Get the schema name

Returns:
the schema name

setTablePrefix

public void setTablePrefix(java.lang.String pTablePrefix)
Deprecated. 
Sets property TablePrefix


getTablePrefix

public java.lang.String getTablePrefix()
Deprecated. 
Returns property TablePrefix


logEvent

public void logEvent(LogEvent pLogEvent)
Deprecated. 
Log an event. This is a convenience method. We just pass this through to addDataItem.

Specified by:
logEvent in interface LogListener
Parameters:
pLogEvent - the log event

addDataItem

public void addDataItem(java.lang.Object pDataItem)
Deprecated. 
Add the given data item to the aggregate

Specified by:
addDataItem in interface DataListener
Parameters:
pDataItem -

getValueArray

protected java.lang.Object[] getValueArray(java.lang.Object pDataItem)
Deprecated. 

sanitizeSQLColumnMappings

public void sanitizeSQLColumnMappings()
Deprecated. 
Filter out invalid column mappings


doStartService

public void doStartService()
                    throws ServiceException
Deprecated. 
Perform any necessary initializations to startup service.
If a schedule is provided, then it is started.

Overrides:
doStartService in class GenericService
Throws:
ServiceException - if the Service had a problem starting up

doStopService

public void doStopService()
                   throws ServiceException
Deprecated. 
Performs tasks required to shutdown service.

Overrides:
doStopService in class GenericService
Throws:
ServiceException - if the Service had a problem shutting down

startScheduledJob

protected void startScheduledJob()
Deprecated. 
If we have a schedule, start scheduled job


performScheduledTask

public void performScheduledTask(Scheduler pScheduler,
                                 ScheduledJob pJob)
Deprecated. 
Callback method for the scheduler. Flush out our summarized data.

Specified by:
performScheduledTask in interface Schedulable
Parameters:
pScheduler - calling the job
pJob - the ScheduledJob

flush

public void flush()
Deprecated. 
Flush our data buffer by writing all of the data to the SQL table and resetting our internal state accordingly. Note that even if the flush() encounters an error it clears the buffer. This method can be called even if there is no data or no data buffer, in which case it will do nothing.

Specified by:
flush in interface DataCollector