com.metamatrix.server.dqp.service.tracker
Class DatabaseCommandLogger

java.lang.Object
  extended by com.metamatrix.server.dqp.service.tracker.DatabaseCommandLogger
All Implemented Interfaces:
CommandLoggerSPI

public class DatabaseCommandLogger
extends java.lang.Object
implements CommandLoggerSPI


Constructor Summary
DatabaseCommandLogger()
           
 
Method Summary
 void close()
          Close this service provider, release any external resources
 void dataSourceCommandEnd(long timestamp, java.lang.String requestID, long sourceCommandID, java.lang.String subTransactionID, java.lang.String modelName, java.lang.String connectorBindingName, java.lang.String sessionID, java.lang.String principal, int finalRowCount, boolean isCancelled, boolean errorOccurred, ExecutionContext context)
          Data source-specific command has ended.
 void dataSourceCommandStart(long timestamp, java.lang.String requestID, long sourceCommandID, java.lang.String subTransactionID, java.lang.String modelName, java.lang.String connectorBindingName, java.lang.String sessionID, java.lang.String principal, java.lang.String sql, ExecutionContext context)
          A data source-specific command has started.
 void initialize(java.util.Properties props)
          Initialize this service provider with the specified properties.
 boolean isStopped()
          Utility method to return whether the log manager for this VM is currently stopped.
 void userCommandEnd(long timestamp, java.lang.String requestID, java.lang.String transactionID, java.lang.String sessionID, java.lang.String principal, java.lang.String vdbName, java.lang.String vdbVersion, int finalRowCount, boolean isCancelled, boolean errorOccurred)
          A user command has ended.
 void userCommandStart(long timestamp, java.lang.String requestID, java.lang.String transactionID, java.lang.String sessionID, java.lang.String applicationName, java.lang.String principal, java.lang.String vdbName, java.lang.String vdbVersion, java.lang.String sql)
          A user command has started.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseCommandLogger

public DatabaseCommandLogger()
Method Detail

isStopped

public boolean isStopped()
Utility method to return whether the log manager for this VM is currently stopped.

Returns:
true if the log manager is currently stopped.

initialize

public void initialize(java.util.Properties props)
Description copied from interface: CommandLoggerSPI
Initialize this service provider with the specified properties. Properties must be specified in the DQP properties (along with the property defining the concrete classname of the implementation of this interface).

Specified by:
initialize in interface CommandLoggerSPI
Parameters:
props - Initialialization properties

close

public void close()
Description copied from interface: CommandLoggerSPI
Close this service provider, release any external resources

Specified by:
close in interface CommandLoggerSPI

dataSourceCommandEnd

public void dataSourceCommandEnd(long timestamp,
                                 java.lang.String requestID,
                                 long sourceCommandID,
                                 java.lang.String subTransactionID,
                                 java.lang.String modelName,
                                 java.lang.String connectorBindingName,
                                 java.lang.String sessionID,
                                 java.lang.String principal,
                                 int finalRowCount,
                                 boolean isCancelled,
                                 boolean errorOccurred,
                                 ExecutionContext context)
Description copied from interface: CommandLoggerSPI
Data source-specific command has ended. This method will be called as the command ends, either normally, by being cancelled, or with an error.

Specified by:
dataSourceCommandEnd in interface CommandLoggerSPI
Parameters:
timestamp - time in milliseconds marking the end of the source command.
requestID - Unique command ID.
sourceCommandID - unique ID of source command, which is also the ID of the plan node representing that source command.
subTransactionID - Unique subtransaction ID (optional, may be null).
modelName - Name of model.
connectorBindingName - Connector binding name.
sessionID - Session ID.
principal - User name.
finalRowCount - Final row count.
isCancelled - true if command was requested to be cancelled, false otherwise.
errorOccurred - true if error occurred, false if status is okay.

dataSourceCommandStart

public void dataSourceCommandStart(long timestamp,
                                   java.lang.String requestID,
                                   long sourceCommandID,
                                   java.lang.String subTransactionID,
                                   java.lang.String modelName,
                                   java.lang.String connectorBindingName,
                                   java.lang.String sessionID,
                                   java.lang.String principal,
                                   java.lang.String sql,
                                   ExecutionContext context)
Description copied from interface: CommandLoggerSPI
A data source-specific command has started. This method will be called as the command starts.

Specified by:
dataSourceCommandStart in interface CommandLoggerSPI
Parameters:
timestamp - time in milliseconds marking the start of the source command.
requestID - Unique command ID.
sourceCommandID - unique ID of source command, which is also the ID of the plan node representing that source command.
subTransactionID - Unique subtransaction ID (optional, may be null).
modelName - Name of model.
connectorBindingName - Connector binding name.
sessionID - Session ID.
principal - User name.
sql - SQL for the command.

userCommandEnd

public void userCommandEnd(long timestamp,
                           java.lang.String requestID,
                           java.lang.String transactionID,
                           java.lang.String sessionID,
                           java.lang.String principal,
                           java.lang.String vdbName,
                           java.lang.String vdbVersion,
                           int finalRowCount,
                           boolean isCancelled,
                           boolean errorOccurred)
Description copied from interface: CommandLoggerSPI
A user command has ended. This method will be called as the command ends, either successfully, with an error, or by being cancelled.

Specified by:
userCommandEnd in interface CommandLoggerSPI
Parameters:
timestamp - time in milliseconds marking the end of the command.
requestID - Unique command ID.
transactionID - Unique transaction ID (optional, may be null)
sessionID - Session ID.
principal - User name.
vdbName - VDB name.
vdbVersion - VDB version.
finalRowCount - total rows returned to the user.
isCancelled - true if command was requested to be cancelled, false otherwise.
errorOccurred - true if error occurred, false if status is okay.

userCommandStart

public void userCommandStart(long timestamp,
                             java.lang.String requestID,
                             java.lang.String transactionID,
                             java.lang.String sessionID,
                             java.lang.String applicationName,
                             java.lang.String principal,
                             java.lang.String vdbName,
                             java.lang.String vdbVersion,
                             java.lang.String sql)
Description copied from interface: CommandLoggerSPI
A user command has started. This method will be called when the command starts.

Specified by:
userCommandStart in interface CommandLoggerSPI
Parameters:
timestamp - time in milliseconds marking the start of the command
requestID - Unique command ID.
transactionID - Unique transaction ID (optional, may be null)
sessionID - Session ID.
applicationName - name of the user application
principal - User name.
vdbName - VDB name.
vdbVersion - VDB version.
sql - SQL for the command.


Copyright © 2009. All Rights Reserved.