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()
getConnectionId in interface CommandContextpublic String getConnectionID()
getConnectionID in interface CommandContextpublic String getUserName()
getUserName in interface CommandContextpublic String getVdbName()
getVdbName in interface CommandContextpublic String getVdbVersion()
getVdbVersion 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()
getCommandPayload in interface CommandContextpublic void setCommandPayload(Serializable commandPayload)
public void setCollectNodeStatistics(boolean collectNodeStatistics)
collectNodeStatistics - The collectNodeStatistics to set.public boolean getCollectNodeStatistics()
public int getProcessorBatchSize()
getProcessorBatchSize in interface CommandContextpublic int getProcessorBatchSize(List<Expression> schema)
public void setProcessorBatchSize(int processorBatchSize)
public double getNextRand()
getNextRand in interface CommandContextpublic double getNextRand(long seed)
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()
getServerTimeZone 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()
getSubject in interface CommandContextpublic void setSubject(Subject subject)
public void accessedPlanningObject(Object id)
public void accessedDataObject(Object id)
public SessionMetadata getSession()
getSession in interface CommandContextpublic void setSession(SessionMetadata session)
public String getRequestId()
getRequestId in interface CommandContextpublic void setRequestId(RequestID requestId)
public void setDQPWorkContext(DQPWorkContext workContext)
public Map<String,DataPolicy> getAllowedDataPolicies()
getAllowedDataPolicies in interface CommandContextpublic VDBMetaData getVdb()
getVdb 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)
addListener in interface CommandContextpublic void removeListener(CommandListener listener)
removeListener 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()
getReuseCount in interface CommandContextpublic boolean isContinuous()
isContinuous in interface CommandContextpublic void setContinuous()
public ClassLoader getVDBClassLoader()
getVDBClassLoader in interface CommandContextpublic void setVDBClassLoader(ClassLoader classLoader)
public List<Exception> getAndClearWarnings()
public void addWarning(Exception warning)
addWarning in interface CommandContextpublic TupleSourceCache getTupleSourceCache()
public void setTupleSourceCache(TupleSourceCache tupleSourceCache)
public Options getOptions()
public void setOptions(Options options)
public boolean isReturnAutoGeneratedKeys()
isReturnAutoGeneratedKeys in interface CommandContextpublic void setReturnAutoGeneratedKeys(List<ElementSymbol> variables)
public List<ElementSymbol> getReturnAutoGeneratedKeys()
public GeneratedKeysImpl returnGeneratedKeys(String[] columnNames, Class<?>[] columnDataTypes)
returnGeneratedKeys in interface CommandContextpublic GeneratedKeysImpl getGeneratedKeys()
getGeneratedKeys 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)
setSessionVariable in interface CommandContextpublic Object getSessionVariable(String key)
getSessionVariable 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
getConnection 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.