public interface AnalyticsDataService
| Modifier and Type | Method and Description |
|---|---|
void |
clearIndices(int tenantId,
String tableName)
Clears all the indices for the given table.
|
void |
createTable(int tenantId,
String tableName)
Creates a table, if not already there, where the columns are not defined here, but can contain any arbitrary number
of columns when data is added.
|
void |
delete(int tenantId,
String tableName,
List<String> ids)
Delete data in a table with given ids.
|
void |
delete(int tenantId,
String tableName,
long timeFrom,
long timeTo)
Deletes a set of records in the table.
|
void |
deleteTable(int tenantId,
String tableName)
Deletes the table with the given category and name if a table exists already.
|
void |
destroy()
Destroys and frees any resources taken up by the analytics data service implementation.
|
org.wso2.carbon.analytics.datasource.core.RecordGroup[] |
get(int tenantId,
String tableName,
List<String> columns,
List<String> ids)
Retrieves data from a table with given ids.
|
org.wso2.carbon.analytics.datasource.core.RecordGroup[] |
get(int tenantId,
String tableName,
List<String> columns,
long timeFrom,
long timeTo,
int recordsFrom,
int recordsCount)
Retrieves data from a table.
|
Map<String,IndexType> |
getIndices(int tenantId,
String tableName)
Returns the declared indices for a given table under the given tenant.
|
long |
getRecordCount(int tenantId,
String tableName)
Returns the number of records in the table with the given category and name.
|
void |
insert(List<org.wso2.carbon.analytics.datasource.core.Record> records)
Adds a new record to the table.
|
List<String> |
listTables(int tenantId)
Lists all the current tables with the given category.
|
Iterator<org.wso2.carbon.analytics.datasource.core.Record> |
readRecords(org.wso2.carbon.analytics.datasource.core.RecordGroup recordGroup)
Reads in the records from a given record group, the records will be streamed in.
|
List<SearchResultEntry> |
search(int tenantId,
String tableName,
String language,
String query,
int start,
int count)
Searches the data with a given search query.
|
int |
searchCount(int tenantId,
String tableName,
String language,
String query)
Returns the search count of results of a given search query.
|
void |
setIndices(int tenantId,
String tableName,
Map<String,IndexType> columns)
Sets the indices for a given table under the given tenant.
|
boolean |
tableExists(int tenantId,
String tableName)
Checks if the specified table with the given category and name exists.
|
void |
update(List<org.wso2.carbon.analytics.datasource.core.Record> records)
Updates the record store with the given records, matches by its record ids, this will be a
full replace of the record, where the older record is effectively deleted and the new one is
added, there will not be a merge of older record's field's with the new one.
|
void createTable(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException
tenantId - The tenant which this table belongs totableName - The name of the table to be createdorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionboolean tableExists(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException
tenantId - The tenant which this table belongs totableName - The table nameorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionvoid deleteTable(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException
tenantId - The tenant which this table belongs totableName - The name of the table to be droppedorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionList<String> listTables(int tenantId) throws org.wso2.carbon.analytics.datasource.core.AnalyticsException
tenantId - The tenant which this table belongs toorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionlong getRecordCount(int tenantId,
String tableName)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException,
org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
tenantId - The tenant which this table belongs totableName - The name of the table to get the count fromorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionvoid insert(List<org.wso2.carbon.analytics.datasource.core.Record> records) throws org.wso2.carbon.analytics.datasource.core.AnalyticsException, org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
records - The list of records to be insertedorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionvoid update(List<org.wso2.carbon.analytics.datasource.core.Record> records) throws org.wso2.carbon.analytics.datasource.core.AnalyticsException, org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
records - The records to be updatedorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionorg.wso2.carbon.analytics.datasource.core.RecordGroup[] get(int tenantId,
String tableName,
List<String> columns,
long timeFrom,
long timeTo,
int recordsFrom,
int recordsCount)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException,
org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
tenantId - The tenant which this table belongs totableName - The name of the table to search oncolumns - The list of columns to required in results, null if all needs to be returnedtimeFrom - The starting time to get records from, inclusive, -1 for beginning of timetimeTo - The ending time to get records to, non-inclusive, -1 for infinityrecordsFrom - The paginated index from value, zero based, inclusiverecordsCount - The paginated records count to be read, -1 for infinityRecordGroup objects, which contains individual data sets in their local locationorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionorg.wso2.carbon.analytics.datasource.core.RecordGroup[] get(int tenantId,
String tableName,
List<String> columns,
List<String> ids)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException,
org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
tenantId - The tenant which this table belongs totableName - The name of the table to search oncolumns - The list of columns to required in results, null if all needs to be returnedids - The list of ids of the records to be readRecordGroup objects, which contains individual data sets in their local locationorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionIterator<org.wso2.carbon.analytics.datasource.core.Record> readRecords(org.wso2.carbon.analytics.datasource.core.RecordGroup recordGroup) throws org.wso2.carbon.analytics.datasource.core.AnalyticsException
recordGroup - The record group which represents the local data setRecord in the local record grouporg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionvoid delete(int tenantId,
String tableName,
long timeFrom,
long timeTo)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException,
org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
tenantId - The tenant which this table belongs totableName - The name of the table to search ontimeFrom - The starting time to get records from for deletiontimeTo - The ending time to get records to for deletionorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionvoid delete(int tenantId,
String tableName,
List<String> ids)
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException,
org.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableException
tenantId - The tenant which this table belongs totableName - The name of the table to search onids - The list of ids of the records to be deletedorg.wso2.carbon.analytics.datasource.core.AnalyticsExceptionorg.wso2.carbon.analytics.datasource.core.AnalyticsTableNotAvailableExceptionvoid setIndices(int tenantId,
String tableName,
Map<String,IndexType> columns)
throws AnalyticsIndexException
tenantId - The tenant idtableName - The table namecolumns - The set of columns to create indices for, and their data typesAnalyticsIndexExceptionMap<String,IndexType> getIndices(int tenantId, String tableName) throws AnalyticsIndexException
tenantId - The tenant idtableName - The table nameAnalyticsIndexExceptionvoid clearIndices(int tenantId,
String tableName)
throws AnalyticsIndexException
tenantId - The tenant idtableName - The table nameAnalyticsIndexExceptionList<SearchResultEntry> search(int tenantId, String tableName, String language, String query, int start, int count) throws AnalyticsIndexException
tenantId - The tenant idtableName - The table namelanguage - The language used to give the search queryquery - The search querystart - The start location of the result, 0 basedcount - The maximum number of result entries to be returnedSearchResultEntrysAnalyticsIndexExceptionint searchCount(int tenantId,
String tableName,
String language,
String query)
throws AnalyticsIndexException
tenantId - The tenant idtableName - The table namelanguage - The language used to give the search queryquery - The search queryAnalyticsIndexExceptionvoid destroy()
throws org.wso2.carbon.analytics.datasource.core.AnalyticsException
org.wso2.carbon.analytics.datasource.core.AnalyticsExceptionCopyright © 2015 WSO2. All rights reserved.