Package io.inversion.elasticsearch
Class ElasticsearchDb
- java.lang.Object
-
- io.inversion.Rule<T>
-
- io.inversion.Db<ElasticsearchDb>
-
- io.inversion.elasticsearch.ElasticsearchDb
-
- All Implemented Interfaces:
java.lang.Comparable<ElasticsearchDb>
public class ElasticsearchDb extends io.inversion.Db<ElasticsearchDb>
-
-
Field Summary
Fields Modifier and Type Field Description protected int[]allowedFailResponseCodesjava.lang.StringdefaultSourceintmaxElasticQuerySizeprotected intmaxRequestDurationprotected java.lang.Stringurl
-
Constructor Summary
Constructors Constructor Description ElasticsearchDb()ElasticsearchDb(java.lang.String elasticUrl)ElasticsearchDb(java.lang.String name, java.lang.String url)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected io.inversion.CollectionbuildCollection(java.lang.String tableName)voidconfigDb()protected voiddeleteRow(io.inversion.Collection collection, java.util.Map<java.lang.String,java.lang.Object> indexValues)Deletes a single specific resource.voiddoDelete(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> indexValues)io.inversion.Results<io.inversion.utils.Rows.Row>doSelect(io.inversion.Collection table, java.util.List<io.inversion.rql.Term> columnMappedTerms)java.util.ListdoUpsert(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> rows)org.elasticsearch.client.RestHighLevelClientgetElasticClient()java.lang.StringgetUrl()java.lang.StringupsertRow(io.inversion.Collection table, java.util.Map<java.lang.String,java.lang.Object> columnMappedTermsRow)ElasticsearchDbwithUrl(java.lang.String url)-
Methods inherited from class io.inversion.Db
beautifyCollectionName, beautifyName, buildCollections, buildRelationships, castDbOutput, castJsonInput, castJsonInput, configApi, delete, doPatch, doShutdown, doShutdown, doStartup, excludeTable, filterOutJsonProperty, getCollection, getCollectionByTableName, getCollections, getProperty, getType, isBootstrap, isDryRun, isRunning, isType, makeRelationshipName, mapToColumnNames, mapToColumnNames, mapToJsonNames, patch, removeCollection, select, shutdown, shutdown, startup, upsert, withBootstrap, withCollection, withCollections, withDryRun, withExcludeColumns, withIncludeColumns, withIncludeTable, withIncludeTables, withType
-
Methods inherited from class io.inversion.Rule
afterWiringComplete, checkLazyConfig, compareTo, doLazyConfig, getAllExcludePaths, getAllIncludeMethods, getAllIncludePaths, getDefaultIncludeMatchers, getDescription, getExcludeMatchers, getIncludeMatchers, getName, getOrder, getParams, match, match, matches, matches, toString, withDescription, withExcludeOn, withExcludeOn, withIncludeOn, withIncludeOn, withName, withOrder, withParam, withParams
-
-
-
-
Field Detail
-
defaultSource
public final java.lang.String defaultSource
-
maxRequestDuration
protected final int maxRequestDuration
- See Also:
- Constant Field Values
-
allowedFailResponseCodes
protected final int[] allowedFailResponseCodes
-
maxElasticQuerySize
public int maxElasticQuerySize
-
url
protected java.lang.String url
-
-
Method Detail
-
getElasticClient
public org.elasticsearch.client.RestHighLevelClient getElasticClient()
-
doSelect
public io.inversion.Results<io.inversion.utils.Rows.Row> doSelect(io.inversion.Collection table, java.util.List<io.inversion.rql.Term> columnMappedTerms) throws io.inversion.ApiException- Overrides:
doSelectin classio.inversion.Db<ElasticsearchDb>- Throws:
io.inversion.ApiException
-
doDelete
public void doDelete(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> indexValues) throws io.inversion.ApiException- Overrides:
doDeletein classio.inversion.Db<ElasticsearchDb>- Throws:
io.inversion.ApiException
-
deleteRow
protected void deleteRow(io.inversion.Collection collection, java.util.Map<java.lang.String,java.lang.Object> indexValues) throws io.inversion.ApiExceptionDeletes a single specific resource.- Parameters:
collection- the collection to delete fromindexValues- identifiers for the records to delete- Throws:
io.inversion.ApiException
-
doUpsert
public java.util.List doUpsert(io.inversion.Collection table, java.util.List<java.util.Map<java.lang.String,java.lang.Object>> rows) throws io.inversion.ApiException- Overrides:
doUpsertin classio.inversion.Db<ElasticsearchDb>- Throws:
io.inversion.ApiException
-
upsertRow
public java.lang.String upsertRow(io.inversion.Collection table, java.util.Map<java.lang.String,java.lang.Object> columnMappedTermsRow) throws io.inversion.ApiException- Throws:
io.inversion.ApiException
-
configDb
public void configDb() throws io.inversion.ApiException- Overrides:
configDbin classio.inversion.Db<ElasticsearchDb>- Throws:
io.inversion.ApiException
-
buildCollection
protected io.inversion.Collection buildCollection(java.lang.String tableName)
-
getUrl
public java.lang.String getUrl()
-
withUrl
public ElasticsearchDb withUrl(java.lang.String url)
-
-