Package org.teiid.translator.solr
Class SolrUpdateExecution
- java.lang.Object
-
- org.teiid.translator.solr.SolrUpdateExecution
-
- All Implemented Interfaces:
Execution
,UpdateExecution
public class SolrUpdateExecution extends Object implements UpdateExecution
-
-
Constructor Summary
Constructors Constructor Description SolrUpdateExecution(SolrExecutionFactory ef, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cancel()
Cancels the execution abnormally.void
close()
Terminates the execution normally.void
execute()
Execute the associated command.int[]
getUpdateCounts()
Returns the update counts for the execution.
-
-
-
Constructor Detail
-
SolrUpdateExecution
public SolrUpdateExecution(SolrExecutionFactory ef, Command command, ExecutionContext executionContext, RuntimeMetadata metadata, SolrConnection connection)
-
-
Method Detail
-
execute
public void execute() throws TranslatorException
Description copied from interface:Execution
Execute the associated command. Results will be retrieved through a specific sub-interface call.- Specified by:
execute
in interfaceExecution
- Throws:
TranslatorException
-
getUpdateCounts
public int[] getUpdateCounts() throws DataNotAvailableException, TranslatorException
Description copied from interface:UpdateExecution
Returns the update counts for the execution.
A single positive integer value is expected for non bulk/batch commands.
bulk/batch should return an integer for each value/command. 0 or greater for successful update count, -2 for no info, -3 failure- Specified by:
getUpdateCounts
in interfaceUpdateExecution
- Returns:
- the update counts corresponding to the command executed
- Throws:
DataNotAvailableException
TranslatorException
-
close
public void close()
Description copied from interface:Execution
Terminates the execution normally.
-
cancel
public void cancel() throws TranslatorException
Description copied from interface:Execution
Cancels the execution abnormally. This will happen via a different thread from the one performing the execution, so should be expected to happen in a multi-threaded scenario.- Specified by:
cancel
in interfaceExecution
- Throws:
TranslatorException
-
-