public class CommandContext extends Object implements Cloneable, CommandContext
| Constructor and Description | 
|---|
CommandContext()  | 
CommandContext(Object processorID,
              String connectionID,
              String userName,
              String vdbName,
              Object vdbVersion)
Construct a new context. 
 | 
CommandContext(String connectionID,
              String userName,
              Serializable commandPayload,
              String vdbName,
              Object vdbVersion,
              boolean collectNodeStatistics)
Construct a new context. 
 | 
public CommandContext(String connectionID, String userName, Serializable commandPayload, String vdbName, Object vdbVersion, boolean collectNodeStatistics)
public CommandContext(Object processorID, String connectionID, String userName, String vdbName, Object vdbVersion)
public CommandContext()
public FunctionMethod.Determinism getDeterminismLevel()
public FunctionMethod.Determinism resetDeterminismLevel(boolean detach)
public FunctionMethod.Determinism resetDeterminismLevel()
public void setDeterminismLevel(FunctionMethod.Determinism level)
public RequestWorkItem getWorkItem()
public void setWorkItem(RequestWorkItem object)
object - public CommandContext clone()
public void setNewVDBState(DQPWorkContext newWorkContext)
public String getConnectionId()
CommandContextgetConnectionId in interface CommandContextpublic String getConnectionID()
CommandContextgetConnectionID in interface CommandContextpublic String getUserName()
CommandContextCommandContext.getSession() - SessionBean.getSecurityDomain()getUserName in interface CommandContextpublic String getVdbName()
CommandContextgetVdbName in interface CommandContextpublic String getVdbVersion()
CommandContextgetVdbVersion in interface CommandContextpublic void setConnectionID(String connectionID)
connectionID - The connectionID to setpublic void setUserName(String userName)
userName - The userName to setpublic void setVdbName(String vdbName)
vdbName - The vdbName to setpublic void setVdbVersion(Object vdbVersion)
vdbVersion - The vdbVersion to setpublic Serializable getCommandPayload()
CommandContextgetCommandPayload in interface CommandContextpublic void setCommandPayload(Serializable commandPayload)
public void setCollectNodeStatistics(boolean collectNodeStatistics)
collectNodeStatistics - The collectNodeStatistics to set.public boolean getCollectNodeStatistics()
public int getProcessorBatchSize()
CommandContextgetProcessorBatchSize in interface CommandContextpublic int getProcessorBatchSize(List<Expression> schema)
public void setProcessorBatchSize(int processorBatchSize)
public double getNextRand()
CommandContextgetNextRand in interface CommandContextpublic double getNextRand(long seed)
CommandContextCommandContext.getNextRand() will be based upon the seed value.getNextRand in interface CommandContextpublic void pushCall(String value) throws QueryProcessingException
QueryProcessingExceptionpublic int getCallStackDepth()
public void popCall()
public void setAuthoriziationValidator(AuthorizationValidator authorizationValidator)
public TempTableStore getTempTableStore()
public void setTempTableStore(TempTableStore tempTableStore)
public TempTableStore getSessionTempTableStore()
public void setSessionTempTableStore(TempTableStore tempTableStore)
public TimeZone getServerTimeZone()
CommandContextTimeZonegetServerTimeZone in interface CommandContextpublic QueryProcessor.ProcessorFactory getQueryProcessorFactory()
public void setQueryProcessorFactory(QueryProcessor.ProcessorFactory queryProcessorFactory)
public VariableContext getVariableContext()
public void setVariableContext(VariableContext variableContext)
public void pushVariableContext(VariableContext toPush)
public Object getFromContext(Expression expression) throws TeiidComponentException
TeiidComponentExceptionpublic long getTimeSliceEnd()
public long getTimeoutEnd()
public void setTimeSliceEnd(long timeSliceEnd)
public void setTimeoutEnd(long timeoutEnd)
public void setMetadata(QueryMetadataInterface metadata)
public QueryMetadataInterface getMetadata()
public BufferManager getBufferManager()
public void setBufferManager(BufferManager bm)
public GlobalTableStore getGlobalTableStore()
public void setGlobalTableStore(GlobalTableStore tempTableStore)
public boolean isNonBlocking()
public void setNonBlocking(boolean nonBlocking)
public void setPreparedPlanCache(SessionAwareCache<PreparedPlan> cache)
public PreparedPlan getPlan(String key)
public void putPlan(String key, PreparedPlan plan, FunctionMethod.Determinism determinismLevel)
public boolean isResultSetCacheEnabled()
public void setResultSetCacheEnabled(boolean resultSetCacheEnabled)
public int getUserRequestSourceConcurrency()
public void setUserRequestSourceConcurrency(int userRequestSourceConcurrency)
public Subject getSubject()
CommandContextgetSubject in interface CommandContextpublic void setSubject(Subject subject)
public void accessedPlanningObject(Object id)
public void accessedDataObject(Object id)
public SessionMetadata getSession()
CommandContextgetSession in interface CommandContextpublic void setSession(SessionMetadata session)
public String getRequestId()
CommandContextgetRequestId in interface CommandContextpublic void setRequestId(RequestID requestId)
public void setDQPWorkContext(DQPWorkContext workContext)
public Map<String,DataPolicy> getAllowedDataPolicies()
CommandContextgetAllowedDataPolicies in interface CommandContextpublic VDBMetaData getVdb()
CommandContextgetVdb in interface CommandContextpublic DQPWorkContext getDQPWorkContext()
public TransactionContext getTransactionContext()
public void setTransactionContext(TransactionContext transactionContext)
public TransactionService getTransactionServer()
public void setTransactionService(TransactionService transactionService)
public Executor getExecutor()
public <V> Future<V> submit(Callable<V> callable)
callable - public void setExecutor(Executor e)
public ReusableExecution<?> getReusableExecution(Object key)
public void putReusableExecution(Object key, ReusableExecution<?> execution)
public void close()
public void addListener(CommandListener listener)
CommandContextaddListener in interface CommandContextpublic void removeListener(CommandListener listener)
CommandContextremoveListener in interface CommandContextpublic static DecimalFormat getDecimalFormat(CommandContext context, String format)
public static SimpleDateFormat getDateFormat(CommandContext context, String format)
public static Pattern getPattern(CommandContext context, String regex, int flags)
Pattern and cache it in
 the CommandContext for future use.context - regex - Regular expression.flags - Bitmask flags like Pattern.CASE_INSENSITIVE.public void incrementReuseCount()
public long getReuseCount()
CommandContextgetReuseCount in interface CommandContextCommandContext.isContinuous()public boolean isContinuous()
isContinuous in interface CommandContextpublic void setContinuous()
public ClassLoader getVDBClassLoader()
CommandContextgetVDBClassLoader in interface CommandContextpublic void setVDBClassLoader(ClassLoader classLoader)
public List<Exception> getAndClearWarnings()
public void addWarning(Exception warning)
CommandContextTeiidSQLWarning for the client.
 The warnings can be consumed through the Statement.getWarnings() method.addWarning in interface CommandContextpublic TupleSourceCache getTupleSourceCache()
public void setTupleSourceCache(TupleSourceCache tupleSourceCache)
public Options getOptions()
public void setOptions(Options options)
public boolean isReturnAutoGeneratedKeys()
CommandContextisReturnAutoGeneratedKeys in interface CommandContextpublic void setReturnAutoGeneratedKeys(List<ElementSymbol> variables)
public List<ElementSymbol> getReturnAutoGeneratedKeys()
public GeneratedKeysImpl returnGeneratedKeys(String[] columnNames, Class<?>[] columnDataTypes)
CommandContextreturnGeneratedKeys in interface CommandContextpublic GeneratedKeysImpl getGeneratedKeys()
CommandContextgetGeneratedKeys in interface CommandContextpublic static CommandContext getThreadLocalContext()
public static void pushThreadLocalContext(CommandContext context)
public static void popThreadLocalContext()
public long addAndGetReservedBuffers(int i)
public Object setSessionVariable(String key, Object value)
CommandContextsetSessionVariable in interface CommandContextpublic Object getSessionVariable(String key)
CommandContextgetSessionVariable in interface CommandContextpublic AuthorizationValidator getAuthorizationValidator()
public TupleSource getCodeLookup(String matTableName, Object keyValue)
public void putCodeLookup(String matTableName, Object keyValue, TupleSource ts)
public TeiidConnection getConnection() throws TeiidSQLException
CommandContextgetConnection in interface CommandContextTeiidSQLExceptionpublic Clob getSpatialRefSys()
public void addCreatedLob(FileStoreInputStreamFactory isf)
public void disableAutoCleanLobs()
public void requestCancelled()
public boolean isCancelled()
public void clearGeneratedKeys()
public Boolean isAccessible(AbstractMetadataRecord record)
public void setAccessible(AbstractMetadataRecord record, Boolean result)
public Throwable getBatchUpdateException()
public void setBatchUpdateException(Throwable t)
public boolean isParallel()
public boolean setParallel(boolean value)
public Date currentDate()
public Time currentTime()
public Timestamp currentTimestamp()
public void setCurrentTimestamp(long currentTimeMillis)
public boolean isAtomicBlock()
public void setAtomicBlock(boolean atomicBlock)
public void addAccessed(TempMetadataID id)
public void setAccessed(Collection<TempMetadataID> accessed)
public boolean isReadOnly()
public void setReadOnly(boolean b)
Copyright © 2020. All rights reserved.