public abstract class OCommandRequestAbstract extends Object implements OCommandRequestInternal, ODistributedCommand
Modifier and Type | Field and Description |
---|---|
protected boolean |
cacheableResult |
protected OCommandContext |
context |
protected String |
fetchPlan |
protected int |
limit |
protected OAsyncReplicationError |
onAsyncReplicationError |
protected OAsyncReplicationOk |
onAsyncReplicationOk |
protected Map<Object,Object> |
parameters |
protected OProgressListener |
progressListener |
protected OCommandResultListener |
resultListener |
protected long |
timeoutMs |
protected OCommandContext.TIMEOUT_STRATEGY |
timeoutStrategy |
protected boolean |
useCache |
Modifier | Constructor and Description |
---|---|
protected |
OCommandRequestAbstract() |
Modifier and Type | Method and Description |
---|---|
void |
addExcludedNode(String node) |
protected Map<Object,Object> |
convertToParameters(Object... iArgs) |
OCommandContext |
getContext() |
String |
getFetchPlan()
This api is deprecated use sql keyword "FETCHPLAN" instead
|
int |
getLimit()
This api is deprecated use sql keyword "LIMIT" instead
|
OAsyncReplicationError |
getOnAsyncReplicationError() |
OAsyncReplicationOk |
getOnAsyncReplicationOk() |
Map<Object,Object> |
getParameters() |
OProgressListener |
getProgressListener() |
OCommandResultListener |
getResultListener() |
OCommandContext.TIMEOUT_STRATEGY |
getTimeoutStrategy()
This api is deprecated use sql keyword "TIMEOUT" instead
|
long |
getTimeoutTime()
This api is deprecated use sql keyword "TIMEOUT" instead
|
boolean |
isCacheableResult() |
boolean |
isRecordResultSet() |
boolean |
isUseCache() |
Set<String> |
nodesToExclude() |
OCommandRequestAbstract |
onAsyncReplicationError(OAsyncReplicationError iCallback)
Defines a callback to call in case of error during the asynchronous replication.
|
OCommandRequestAbstract |
onAsyncReplicationOk(OAsyncReplicationOk iCallback)
Defines a callback to call in case of the asynchronous replication succeed.
|
void |
removeExcludedNode(String node) |
void |
reset() |
void |
setCacheableResult(boolean iValue) |
OCommandRequestAbstract |
setContext(OCommandContext iContext) |
<RET extends OCommandRequest> |
setFetchPlan(String fetchPlan)
This api is deprecated use sql keyword "FETCHPLAN" instead
|
OCommandRequestAbstract |
setLimit(int limit)
This api is deprecated use sql keyword "LIMIT" instead
|
protected void |
setParameters(Object... iArgs) |
OCommandRequestAbstract |
setProgressListener(OProgressListener progressListener) |
void |
setRecordResultSet(boolean recordResultSet)
Communicate to a listener if the result set is an record based or anything else
|
void |
setResultListener(OCommandResultListener iListener) |
void |
setTimeout(long timeout,
OCommandContext.TIMEOUT_STRATEGY strategy)
This api is deprecated use sql keyword "TIMEOUT" instead
|
void |
setUseCache(boolean useCache) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
execute, isIdempotent
protected OCommandResultListener resultListener
protected OProgressListener progressListener
protected int limit
protected long timeoutMs
protected OCommandContext.TIMEOUT_STRATEGY timeoutStrategy
protected String fetchPlan
protected boolean useCache
protected boolean cacheableResult
protected OCommandContext context
protected OAsyncReplicationOk onAsyncReplicationOk
protected OAsyncReplicationError onAsyncReplicationError
public OCommandResultListener getResultListener()
getResultListener
in interface OCommandRequestInternal
public void setResultListener(OCommandResultListener iListener)
setResultListener
in interface OCommandRequestInternal
public Map<Object,Object> getParameters()
getParameters
in interface OCommandRequestInternal
protected void setParameters(Object... iArgs)
public OCommandRequestAbstract onAsyncReplicationOk(OAsyncReplicationOk iCallback)
onAsyncReplicationOk
in interface ODistributedCommand
public OCommandRequestAbstract onAsyncReplicationError(OAsyncReplicationError iCallback)
onAsyncReplicationError
in interface ODistributedCommand
public OProgressListener getProgressListener()
getProgressListener
in interface OCommandRequestInternal
public OCommandRequestAbstract setProgressListener(OProgressListener progressListener)
setProgressListener
in interface OCommandRequestInternal
public void reset()
reset
in interface OCommandRequestInternal
public int getLimit()
OCommandRequest
Returns the limit of result set. -1 means no limits.
getLimit
in interface OCommandRequest
public OCommandRequestAbstract setLimit(int limit)
OCommandRequest
Sets the maximum items the command can returns. -1 means no limits.
setLimit
in interface OCommandRequest
limit
- -1 = no limit. 1 to N to limit the result set.public String getFetchPlan()
OCommandRequest
Returns the fetch plan if any
getFetchPlan
in interface OCommandRequest
public <RET extends OCommandRequest> RET setFetchPlan(String fetchPlan)
OCommandRequest
Set the fetch plan. The format is:
<field>:<depth-level>*Where:
children:-1 parent:0 sibling:3 *:0
setFetchPlan
in interface OCommandRequest
public boolean isUseCache()
public void setUseCache(boolean useCache)
setUseCache
in interface OCommandRequest
public boolean isCacheableResult()
isCacheableResult
in interface OCommandRequestInternal
public void setCacheableResult(boolean iValue)
setCacheableResult
in interface OCommandRequestInternal
public OCommandContext getContext()
getContext
in interface OCommandRequest
public OCommandRequestAbstract setContext(OCommandContext iContext)
setContext
in interface OCommandRequest
public long getTimeoutTime()
OCommandRequest
Returns the command timeout. 0 means no timeout.
getTimeoutTime
in interface OCommandRequest
public void setTimeout(long timeout, OCommandContext.TIMEOUT_STRATEGY strategy)
OCommandRequest
Sets the command timeout. When the command execution time is major than the timeout the command returns
setTimeout
in interface OCommandRequest
public OCommandContext.TIMEOUT_STRATEGY getTimeoutStrategy()
OCommandRequest
Returns the command timeout strategy between the defined ones.
getTimeoutStrategy
in interface OCommandRequest
public Set<String> nodesToExclude()
nodesToExclude
in interface ODistributedCommand
public void addExcludedNode(String node)
public void removeExcludedNode(String node)
public OAsyncReplicationOk getOnAsyncReplicationOk()
public OAsyncReplicationError getOnAsyncReplicationError()
public void setRecordResultSet(boolean recordResultSet)
OCommandRequestInternal
setRecordResultSet
in interface OCommandRequestInternal
public boolean isRecordResultSet()
isRecordResultSet
in interface OCommandRequestInternal
Copyright © 2009–2020 OrientDB. All rights reserved.