Package com.arcadedb.query.sql.executor
Interface CommandContext
-
- All Known Implementing Classes:
BasicCommandContext
public interface CommandContext
Basic interface for commands. Manages the context variables during execution.- Author:
- Luca Garulli (l.garulli--(at)--gmail.com)
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
CommandContext.TIMEOUT_STRATEGY
-
Method Summary
-
-
-
Method Detail
-
setVariable
CommandContext setVariable(String iName, Object iValue)
-
incrementVariable
CommandContext incrementVariable(String getNeighbors)
-
getParent
CommandContext getParent()
-
setParent
CommandContext setParent(CommandContext iParentContext)
-
setChild
CommandContext setChild(CommandContext context)
-
updateMetric
long updateMetric(String iName, long iValue)
Updates a counter. Used to record metrics.- Parameters:
iName
- Metric's nameiValue
- delta to add or subtract- Returns:
-
isRecordingMetrics
boolean isRecordingMetrics()
-
setRecordingMetrics
CommandContext setRecordingMetrics(boolean recordMetrics)
-
beginExecution
void beginExecution(long timeoutMs, CommandContext.TIMEOUT_STRATEGY iStrategy)
-
checkTimeout
boolean checkTimeout()
Check if timeout is elapsed, if defined.- Returns:
- false if it the timeout is elapsed and strategy is "return" if the strategy is "exception" (default)
-
copy
CommandContext copy()
Creates a copy of execution context.
-
getDatabase
DatabaseInternal getDatabase()
-
declareScriptVariable
void declareScriptVariable(String varName)
-
isScriptVariableDeclared
boolean isScriptVariableDeclared(String varName)
-
-