Class OCommandExecutorScript
java.lang.Object
com.orientechnologies.common.parser.OBaseParser
com.orientechnologies.orient.core.command.OCommandExecutorAbstract
com.orientechnologies.orient.core.command.script.OCommandExecutorScript
- All Implemented Interfaces:
OCommandDistributedReplicateRequest,OCommandExecutor,OTemporaryRidGenerator
public class OCommandExecutorScript
extends OCommandExecutorAbstract
implements OCommandDistributedReplicateRequest, OTemporaryRidGenerator
Executes Script Commands.
- Author:
- Luca Garulli (l.garulli--(at)--orientdb.com)
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.orientechnologies.orient.core.command.OCommandDistributedReplicateRequest
OCommandDistributedReplicateRequest.DISTRIBUTED_EXECUTION_MODE, OCommandDistributedReplicateRequest.DISTRIBUTED_RESULT_MGMT, OCommandDistributedReplicateRequest.QUORUM_TYPE -
Field Summary
FieldsFields inherited from class com.orientechnologies.orient.core.command.OCommandExecutorAbstract
context, limit, parameters, progressListenerFields inherited from class com.orientechnologies.common.parser.OBaseParser
parserText, parserTextUpperCase -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionExecute the requested command parsed previously.executeInContext(OCommandContext iContext, Map<Object, Object> iArgs) protected ObjectexecuteJsr223Script(String language, OCommandContext iContext, Map<Object, Object> iArgs) protected Objectprotected ObjectexecuteSQLScript(String iText, ODatabaseDocument db) Returns the execution mode when distributed configuration is active: LOCAL: executed on local node only REPLICATE: executed on all the nodes and expect the same result SHARDED: executed on all the involved nodes and merge resultsReturns the quorum type for the command: NONE: no quorum READ: configured Read quorum WRITE: configured Write quorum ALL: all nodesintgetTemporaryRIDCounter(OCommandContext iContext) booleanReturns true if the command doesn't change the database, otherwise false.parse(OCommandRequest iRequest) Parse the request.protected voidthrowSyntaxErrorException(String iText) Throws a syntax error exception.protected voidWait before to retryMethods inherited from class com.orientechnologies.orient.core.command.OCommandExecutorAbstract
checkInterruption, checkInterruption, getContext, getDatabase, getDistributedResultManagement, getDistributedTimeout, getFetchPlan, getInvolvedClusters, getLimit, getParameters, getProgressListener, getSecurityOperationType, getUndoCommand, init, involveSchema, isCacheable, isDistributedExecutingOnLocalNodeFirst, isLocalExecution, mergeResults, setContext, setLimit, setProgressListener, toStringMethods inherited from class com.orientechnologies.common.parser.OBaseParser
getLastWordLength, getSyntax, getWordStatic, nextWord, nextWord, parseOptionalWord, parserGetCurrentChar, parserGetCurrentPosition, parserGetLastSeparator, parserGetLastWord, parserGetPreviousPosition, parserGoBack, parserIsEnded, parserMoveCurrentPosition, parserNextChars, parserNextWord, parserNextWord, parserNextWord, parserOptionalKeyword, parserOptionalWord, parserRequiredKeyword, parserRequiredWord, parserRequiredWord, parserRequiredWord, parserSetCurrentPosition, parserSetEndOfText, parserSetLastSeparator, parserSkipWhiteSpacesMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.orientechnologies.orient.core.command.OCommandDistributedReplicateRequest
getDistributedResultManagement, getDistributedTimeout, getUndoCommand, isDistributedExecutingOnLocalNodeFirstMethods inherited from interface com.orientechnologies.orient.core.command.OCommandExecutor
getSyntax
-
Field Details
-
request
-
executionMode
-
serialTempRID
-
-
Constructor Details
-
OCommandExecutorScript
public OCommandExecutorScript()
-
-
Method Details
-
parse
Description copied from interface:OCommandExecutorParse the request. Once parsed the command can be executed multiple times by using the execute() method.- Specified by:
parsein interfaceOCommandExecutor- Parameters:
iRequest- Command request implementation.- Returns:
- See Also:
-
getDistributedExecutionMode
Description copied from interface:OCommandDistributedReplicateRequestReturns the execution mode when distributed configuration is active:- LOCAL: executed on local node only
- REPLICATE: executed on all the nodes and expect the same result
- SHARDED: executed on all the involved nodes and merge results
- Specified by:
getDistributedExecutionModein interfaceOCommandDistributedReplicateRequest
-
execute
Description copied from interface:OCommandExecutorExecute the requested command parsed previously.- Specified by:
executein interfaceOCommandExecutor- Parameters:
iArgs- Optional variable arguments to pass to the command.- Returns:
- See Also:
-
executeInContext
-
isIdempotent
public boolean isIdempotent()Description copied from interface:OCommandExecutorReturns true if the command doesn't change the database, otherwise false.- Specified by:
isIdempotentin interfaceOCommandExecutor
-
executeJsr223Script
-
executeSQL
-
throwSyntaxErrorException
Description copied from class:OBaseParserThrows a syntax error exception.- Specified by:
throwSyntaxErrorExceptionin classOBaseParser- Parameters:
iText- Text about the problem.
-
executeSQLScript
- Throws:
IOException
-
waitForNextRetry
protected void waitForNextRetry()Wait before to retry -
getQuorumType
Description copied from interface:OCommandDistributedReplicateRequestReturns the quorum type for the command:- NONE: no quorum
- READ: configured Read quorum
- WRITE: configured Write quorum
- ALL: all nodes
- Specified by:
getQuorumTypein interfaceOCommandDistributedReplicateRequest
-
getTemporaryRIDCounter
- Specified by:
getTemporaryRIDCounterin interfaceOTemporaryRidGenerator
-