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()
CommandContext
getConnectionId
in interface CommandContext
public String getConnectionID()
CommandContext
getConnectionID
in interface CommandContext
public String getUserName()
CommandContext
CommandContext.getSession()
- SessionBean.getSecurityDomain()
getUserName
in interface CommandContext
public String getVdbName()
CommandContext
getVdbName
in interface CommandContext
public String getVdbVersion()
CommandContext
getVdbVersion
in interface CommandContext
public 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()
CommandContext
getCommandPayload
in interface CommandContext
public void setCommandPayload(Serializable commandPayload)
public void setCollectNodeStatistics(boolean collectNodeStatistics)
collectNodeStatistics
- The collectNodeStatistics to set.public boolean getCollectNodeStatistics()
public int getProcessorBatchSize()
CommandContext
getProcessorBatchSize
in interface CommandContext
public int getProcessorBatchSize(List<Expression> schema)
public void setProcessorBatchSize(int processorBatchSize)
public double getNextRand()
CommandContext
getNextRand
in interface CommandContext
public double getNextRand(long seed)
CommandContext
CommandContext.getNextRand()
will be based upon the seed value.getNextRand
in interface CommandContext
public void pushCall(String value) throws QueryProcessingException
QueryProcessingException
public 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()
CommandContext
TimeZone
getServerTimeZone
in interface CommandContext
public 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
TeiidComponentException
public 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()
CommandContext
getSubject
in interface CommandContext
public void setSubject(Subject subject)
public void accessedPlanningObject(Object id)
public void accessedDataObject(Object id)
public SessionMetadata getSession()
CommandContext
getSession
in interface CommandContext
public void setSession(SessionMetadata session)
public String getRequestId()
CommandContext
getRequestId
in interface CommandContext
public void setRequestId(RequestID requestId)
public void setDQPWorkContext(DQPWorkContext workContext)
public Map<String,DataPolicy> getAllowedDataPolicies()
CommandContext
getAllowedDataPolicies
in interface CommandContext
public VDBMetaData getVdb()
CommandContext
getVdb
in interface CommandContext
public 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)
CommandContext
addListener
in interface CommandContext
public void removeListener(CommandListener listener)
CommandContext
removeListener
in interface CommandContext
public 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()
CommandContext
getReuseCount
in interface CommandContext
CommandContext.isContinuous()
public boolean isContinuous()
isContinuous
in interface CommandContext
public void setContinuous()
public ClassLoader getVDBClassLoader()
CommandContext
getVDBClassLoader
in interface CommandContext
public void setVDBClassLoader(ClassLoader classLoader)
public List<Exception> getAndClearWarnings()
public void addWarning(Exception warning)
CommandContext
TeiidSQLWarning
for the client.
The warnings can be consumed through the Statement.getWarnings()
method.addWarning
in interface CommandContext
public TupleSourceCache getTupleSourceCache()
public void setTupleSourceCache(TupleSourceCache tupleSourceCache)
public Options getOptions()
public void setOptions(Options options)
public boolean isReturnAutoGeneratedKeys()
CommandContext
isReturnAutoGeneratedKeys
in interface CommandContext
public void setReturnAutoGeneratedKeys(List<ElementSymbol> variables)
public List<ElementSymbol> getReturnAutoGeneratedKeys()
public GeneratedKeysImpl returnGeneratedKeys(String[] columnNames, Class<?>[] columnDataTypes)
CommandContext
returnGeneratedKeys
in interface CommandContext
public GeneratedKeysImpl getGeneratedKeys()
CommandContext
getGeneratedKeys
in interface CommandContext
public 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)
CommandContext
setSessionVariable
in interface CommandContext
public Object getSessionVariable(String key)
CommandContext
getSessionVariable
in interface CommandContext
public AuthorizationValidator getAuthorizationValidator()
public TupleSource getCodeLookup(String matTableName, Object keyValue)
public void putCodeLookup(String matTableName, Object keyValue, TupleSource ts)
public TeiidConnection getConnection() throws TeiidSQLException
CommandContext
getConnection
in interface CommandContext
TeiidSQLException
public 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.