See also

Types

Link copied to clipboard
object Companion

Companion object.

Functions

Link copied to clipboard

Adds a listener to be notified of data provider changes.

Link copied to clipboard

Adds a listener to be notified when IndexableDataProviderEngine registered in this data provider. When a new listener is added, it will be invoked for each previously registered IndexableDataProviderEngine.

Link copied to clipboard
open fun clear(callback: CompletionCallback<Unit>): AsyncOperationTask
abstract fun clear(executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask

Removes all the records in this data provider.

Link copied to clipboard
open fun contains(id: String, callback: CompletionCallback<Boolean>): AsyncOperationTask
abstract fun contains(id: String, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask

Checks whether this data provider contains a record with specified id.

Link copied to clipboard
open fun get(id: String, callback: CompletionCallback<in HistoryRecord?>): AsyncOperationTask

Retrieves the record with specified id or null if there's no such record.

abstract fun get(id: String, executor: Executor, callback: CompletionCallback<in HistoryRecord?>): AsyncOperationTask

Retrieves the record with specified id or null if there's no such record.

Link copied to clipboard
open fun getAll(callback: CompletionCallback<List<HistoryRecord>>): AsyncOperationTask
abstract fun getAll(executor: Executor, callback: CompletionCallback<List<HistoryRecord>>): AsyncOperationTask

Retrieves all records from this provider.

Link copied to clipboard
open fun registerIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, callback: CompletionCallback<Unit>): AsyncOperationTask
abstract fun registerIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask

Registers engine with this data provider. Allows to keep search index of search engines, associated with this data provider, up-to-date.

Link copied to clipboard
open fun remove(id: String, callback: CompletionCallback<Boolean>): AsyncOperationTask
abstract fun remove(id: String, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask

Removes the record with specified id. Passed to callback true if the record was removed and false if there was no record with the specified id.

Link copied to clipboard

Removes a previously added listener.

Link copied to clipboard
open fun unregisterIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, callback: CompletionCallback<Boolean>): AsyncOperationTask
abstract fun unregisterIndexableDataProviderEngine(dataProviderEngine: IndexableDataProviderEngine, executor: Executor, callback: CompletionCallback<Boolean>): AsyncOperationTask

Unregisters engine from this data provider.

Link copied to clipboard
open fun upsert(record: HistoryRecord, callback: CompletionCallback<Unit>): AsyncOperationTask

Insert or update a record to this data provider.

abstract fun upsert(record: HistoryRecord, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask

Insert or update a record in this data provider.

Link copied to clipboard
open fun upsertAll(records: List<HistoryRecord>, callback: CompletionCallback<Unit>): AsyncOperationTask
abstract fun upsertAll(records: List<HistoryRecord>, executor: Executor, callback: CompletionCallback<Unit>): AsyncOperationTask

Upsert (insert or update) multiple records to this data provider.

Properties

Link copied to clipboard
abstract val dataProviderName: String

Data provider name.

Link copied to clipboard
abstract val priority: Int

Data provider priority. In case of multiple data providers registered in a com.mapbox.search.SearchEngine, IndexableRecord's with higher priority will be ranked higher in the search results list.