com.metamatrix.query.util
Class CommandContext

java.lang.Object
  extended by com.metamatrix.query.util.CommandContext
All Implemented Interfaces:
java.lang.Cloneable

public class CommandContext
extends java.lang.Object
implements java.lang.Cloneable

Defines the context that a command is processing in. For example, this defines who is processing the command and why. Also, this class (or subclasses) provide a means to pass context-specific information between users of the query processor framework.


Constructor Summary
  CommandContext()
           
protected CommandContext(CommandContext context)
           
  CommandContext(java.lang.Object processorID, java.lang.String connectionID, TupleSourceID tupleSourceID, int outputBatchSize, java.lang.String userName, java.io.Serializable trustedPayload, java.io.Serializable commandPayload, java.lang.String vdbName, java.lang.String vdbVersion, java.util.Properties envProperties, boolean processDebug, boolean collectNodeStatistics)
          Construct a new context.
  CommandContext(java.lang.Object processorID, java.lang.String connectionID, TupleSourceID tupleSourceID, int outputBatchSize, java.lang.String userName, java.io.Serializable trustedPayLoad, java.lang.String vdbName, java.lang.String vdbVersion)
          Construct a new context.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object obj)
           
 int getCallStackDepth()
           
 boolean getCollectNodeStatistics()
           
 java.io.Serializable getCommandPayload()
           
 java.lang.String getConnectionID()
           
 int getConnectorBatchSize()
           
 java.util.Properties getEnvironmentProperties()
           
 double getNextRand()
           
 double getNextRand(long seed)
           
 int getOutputBatchSize()
           
 PlanToProcessConverter getPlanToProcessConverter()
           
 java.util.List getPreparedBatchUpdateValues()
           
 boolean getProcessDebug()
           
 int getProcessorBatchSize()
           
 java.lang.Object getProcessorID()
           
 QueryProcessor.ProcessorFactory getQueryProcessorFactory()
           
 SecurityFunctionEvaluator getSecurityFunctionEvaluator()
           
 java.util.TimeZone getServerTimeZone()
           
 int getStreamingBatchSize()
           
 java.lang.Object getTempTableStore()
           
 java.io.Serializable getTrustedPayload()
           
 TupleSourceID getTupleSourceID()
           
 java.lang.String getUserName()
           
 java.lang.String getVdbName()
           
 java.lang.String getVdbVersion()
           
 int hashCode()
           
 boolean isOptimisticTransaction()
           
 void popCall()
           
 void pushCall(java.lang.String value)
           
 void setCollectNodeStatistics(boolean collectNodeStatistics)
           
 void setCommandPayload(java.io.Serializable commandPayload)
           
 void setConnectionID(java.lang.String connectionID)
          Sets the connectionID.
 void setConnectorBatchSize(int connectorBatchSize)
           
 void setEnvironmentProperties(java.util.Properties properties)
           
 void setOptimisticTransaction(boolean optimisticTransaction)
           
 void setOutputBatchSize(int i)
           
 void setPlanToProcessConverter(PlanToProcessConverter planToProcessConverter)
           
 void setPreparedBatchUpdateValues(java.util.List preparedBatchUpdateValues)
           
 void setProcessDebug(boolean processDebug)
           
 void setProcessorBatchSize(int processorBatchSize)
           
 void setProcessorID(java.lang.Object object)
           
 void setQueryProcessorFactory(QueryProcessor.ProcessorFactory queryProcessorFactory)
           
 void setSecurityFunctionEvaluator(SecurityFunctionEvaluator securityFunctionEvaluator)
           
 void setStreamingBatchSize(int streamingBatchSize)
           
 void setTempTableStore(java.lang.Object tempTableStore)
           
 void setTrustedPayload(java.io.Serializable trustedPayLoad)
          Sets the trustedPayLoad.
 void setTupleSourceID(TupleSourceID sourceID)
           
 void setUserName(java.lang.String userName)
          Sets the userName.
 void setVdbName(java.lang.String vdbName)
          Sets the vdbName.
 void setVdbVersion(java.lang.String vdbVersion)
          Sets the vdbVersion.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CommandContext

public CommandContext(java.lang.Object processorID,
                      java.lang.String connectionID,
                      TupleSourceID tupleSourceID,
                      int outputBatchSize,
                      java.lang.String userName,
                      java.io.Serializable trustedPayload,
                      java.io.Serializable commandPayload,
                      java.lang.String vdbName,
                      java.lang.String vdbVersion,
                      java.util.Properties envProperties,
                      boolean processDebug,
                      boolean collectNodeStatistics)
Construct a new context.

Parameters:
collectNodeStatistics - TODO

CommandContext

public CommandContext(java.lang.Object processorID,
                      java.lang.String connectionID,
                      TupleSourceID tupleSourceID,
                      int outputBatchSize,
                      java.lang.String userName,
                      java.io.Serializable trustedPayLoad,
                      java.lang.String vdbName,
                      java.lang.String vdbVersion)
Construct a new context.


CommandContext

protected CommandContext(CommandContext context)

CommandContext

public CommandContext()
Method Detail

getOutputBatchSize

public int getOutputBatchSize()
Returns:

getProcessorID

public java.lang.Object getProcessorID()
Returns:

getTupleSourceID

public TupleSourceID getTupleSourceID()
Returns:

getProcessDebug

public boolean getProcessDebug()

setProcessDebug

public void setProcessDebug(boolean processDebug)

setOutputBatchSize

public void setOutputBatchSize(int i)
Parameters:
i -

setProcessorID

public void setProcessorID(java.lang.Object object)
Parameters:
object -

setTupleSourceID

public void setTupleSourceID(TupleSourceID sourceID)
Parameters:
sourceID -

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getConnectionID

public java.lang.String getConnectionID()
Returns:
String

getTrustedPayload

public java.io.Serializable getTrustedPayload()
Returns:
Serializable

getUserName

public java.lang.String getUserName()
Returns:
String

getVdbName

public java.lang.String getVdbName()
Returns:
String

getVdbVersion

public java.lang.String getVdbVersion()
Returns:
String

setConnectionID

public void setConnectionID(java.lang.String connectionID)
Sets the connectionID.

Parameters:
connectionID - The connectionID to set

setTrustedPayload

public void setTrustedPayload(java.io.Serializable trustedPayLoad)
Sets the trustedPayLoad.

Parameters:
trustedPayLoad - The trustedPayLoad to set

setUserName

public void setUserName(java.lang.String userName)
Sets the userName.

Parameters:
userName - The userName to set

setVdbName

public void setVdbName(java.lang.String vdbName)
Sets the vdbName.

Parameters:
vdbName - The vdbName to set

setVdbVersion

public void setVdbVersion(java.lang.String vdbVersion)
Sets the vdbVersion.

Parameters:
vdbVersion - The vdbVersion to set

getEnvironmentProperties

public java.util.Properties getEnvironmentProperties()

setEnvironmentProperties

public void setEnvironmentProperties(java.util.Properties properties)

getCommandPayload

public java.io.Serializable getCommandPayload()

setCommandPayload

public void setCommandPayload(java.io.Serializable commandPayload)

setCollectNodeStatistics

public void setCollectNodeStatistics(boolean collectNodeStatistics)
Parameters:
collectNodeStatistics - The collectNodeStatistics to set.
Since:
4.2

getCollectNodeStatistics

public boolean getCollectNodeStatistics()

getStreamingBatchSize

public int getStreamingBatchSize()

setStreamingBatchSize

public void setStreamingBatchSize(int streamingBatchSize)

getConnectorBatchSize

public int getConnectorBatchSize()

setConnectorBatchSize

public void setConnectorBatchSize(int connectorBatchSize)

getProcessorBatchSize

public int getProcessorBatchSize()

setProcessorBatchSize

public void setProcessorBatchSize(int processorBatchSize)

getNextRand

public double getNextRand()

getNextRand

public double getNextRand(long seed)

pushCall

public void pushCall(java.lang.String value)
              throws QueryProcessingException
Throws:
QueryProcessingException

getCallStackDepth

public int getCallStackDepth()

popCall

public void popCall()

setOptimisticTransaction

public void setOptimisticTransaction(boolean optimisticTransaction)
Parameters:
optimisticTransaction - The optimisticTransaction to set.

isOptimisticTransaction

public boolean isOptimisticTransaction()
Returns:
Returns the optimisticTransaction.

getSecurityFunctionEvaluator

public SecurityFunctionEvaluator getSecurityFunctionEvaluator()
Returns:
Returns the securityFunctionEvaluator.

setSecurityFunctionEvaluator

public void setSecurityFunctionEvaluator(SecurityFunctionEvaluator securityFunctionEvaluator)
Parameters:
securityFunctionEvaluator - The securityFunctionEvaluator to set.

getPreparedBatchUpdateValues

public java.util.List getPreparedBatchUpdateValues()

setPreparedBatchUpdateValues

public void setPreparedBatchUpdateValues(java.util.List preparedBatchUpdateValues)

getTempTableStore

public java.lang.Object getTempTableStore()

setTempTableStore

public void setTempTableStore(java.lang.Object tempTableStore)

getServerTimeZone

public java.util.TimeZone getServerTimeZone()

setPlanToProcessConverter

public void setPlanToProcessConverter(PlanToProcessConverter planToProcessConverter)

getPlanToProcessConverter

public PlanToProcessConverter getPlanToProcessConverter()

getQueryProcessorFactory

public QueryProcessor.ProcessorFactory getQueryProcessorFactory()

setQueryProcessorFactory

public void setQueryProcessorFactory(QueryProcessor.ProcessorFactory queryProcessorFactory)


Copyright © 2009. All Rights Reserved.