
public class OBasicCommandContext extends Object implements OCommandContext
OCommandContext.TIMEOUT_STRATEGY| Modifier and Type | Field and Description |
|---|---|
protected OCommandContext |
child |
static String |
EXECUTION_BEGUN |
protected Map<Object,Object> |
inputParameters |
static String |
INVALID_COMPARE_COUNT |
protected OCommandContext |
parent |
protected boolean |
recordMetrics |
protected AtomicLong |
resultsProcessed |
static String |
TIMEOUT_MS |
static String |
TIMEOUT_STRATEGY |
protected Set<Object> |
uniqueResult |
protected Map<String,Object> |
variables |
| Constructor and Description |
|---|
OBasicCommandContext() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addToUniqueResult(Object o)
adds an item to the unique result set
|
void |
beginExecution(long iTimeout,
OCommandContext.TIMEOUT_STRATEGY iStrategy) |
boolean |
checkTimeout()
Check if timeout is elapsed, if defined.
|
OCommandContext |
copy()
Creates a copy of execution context.
|
Map<Object,Object> |
getInputParameters() |
OCommandContext |
getParent() |
AtomicLong |
getResultsProcessed()
returns the number of results processed.
|
Object |
getVariable(String iName) |
Object |
getVariable(String iName,
Object iDefault) |
protected Object |
getVariableFromParentHierarchy(String varName) |
Map<String,Object> |
getVariables()
Returns a read-only map with all the variables.
|
OCommandContext |
incrementVariable(String iName) |
boolean |
isRecordingMetrics() |
void |
merge(OCommandContext iContext)
Merges a context with current one.
|
OCommandContext |
setChild(OCommandContext iContext)
Set the inherited context avoiding to copy all the values every time.
|
void |
setInputParameters(Map<Object,Object> inputParameters) |
OCommandContext |
setParent(OCommandContext iParentContext) |
OCommandContext |
setRecordingMetrics(boolean recordMetrics) |
OCommandContext |
setVariable(String iName,
Object iValue) |
String |
toString() |
long |
updateMetric(String iName,
long iValue)
Updates a counter.
|
public static final String EXECUTION_BEGUN
public static final String TIMEOUT_MS
public static final String TIMEOUT_STRATEGY
public static final String INVALID_COMPARE_COUNT
protected boolean recordMetrics
protected OCommandContext parent
protected OCommandContext child
protected AtomicLong resultsProcessed
public Object getVariable(String iName)
getVariable in interface OCommandContextpublic Object getVariable(String iName, Object iDefault)
getVariable in interface OCommandContextpublic OCommandContext setVariable(String iName, Object iValue)
setVariable in interface OCommandContextpublic OCommandContext incrementVariable(String iName)
incrementVariable in interface OCommandContextpublic long updateMetric(String iName, long iValue)
OCommandContextupdateMetric in interface OCommandContextiName - Metric's nameiValue - delta to add or subtractpublic Map<String,Object> getVariables()
getVariables in interface OCommandContextpublic OCommandContext setChild(OCommandContext iContext)
setChild in interface OCommandContextpublic OCommandContext getParent()
getParent in interface OCommandContextpublic OCommandContext setParent(OCommandContext iParentContext)
setParent in interface OCommandContextpublic boolean isRecordingMetrics()
isRecordingMetrics in interface OCommandContextpublic OCommandContext setRecordingMetrics(boolean recordMetrics)
setRecordingMetrics in interface OCommandContextpublic void beginExecution(long iTimeout,
OCommandContext.TIMEOUT_STRATEGY iStrategy)
beginExecution in interface OCommandContextpublic boolean checkTimeout()
OCommandContextcheckTimeout in interface OCommandContextpublic OCommandContext copy()
OCommandContextcopy in interface OCommandContextpublic void merge(OCommandContext iContext)
OCommandContextmerge in interface OCommandContextpublic Map<Object,Object> getInputParameters()
getInputParameters in interface OCommandContextpublic void setInputParameters(Map<Object,Object> inputParameters)
setInputParameters in interface OCommandContextpublic AtomicLong getResultsProcessed()
public boolean addToUniqueResult(Object o)
o - the result item to addCopyright © 2009–2025 OrientDB. All rights reserved.