Send feedback
IndexingService
Stay organized with collections
Save and categorize content based on your preferences.
Known Indirect Subclasses
Access point between the connector developer and the indexing service API backend.
Public Method Summary
abstract
ListenableFuture<Operation>
abstract
ListenableFuture<Operation>
abstract
Item
abstract
Operation
abstract
Schema
abstract
ListenableFuture<Operation>
abstract
ListenableFuture<Operation>
abstract
Iterable<Item>
listItem (boolean brief)
Fetches the first of what may be many sets of
Item
.
abstract
List<Item>
poll (PollItemsRequest pollQueueRequest)
Fetches
Item
entries from the queue using custom API parameters.
abstract
Iterable<Item>
pollAll (PollItemsRequest pollQueueRequest)
Fetches all of the
Item
entries repeatedly from the queue until the entire queue is
exhausted.
abstract
ListenableFuture<Item>
push (String id, PushItem pushItem)
Pushes a
PushItem
object to indexing API Queue.
abstract
UploadItemRef
abstract
ListenableFuture<Operation>
unreserve (String queue)
Unreserves previously polled
Item
entries in a specific queue.
Inherited Method Summary
From interface
com.google.common.util.concurrent.Service
abstract
void
addListener (Service.Listener arg0, Executor arg1)
abstract
void
awaitRunning ()
abstract
void
awaitRunning (long arg0, TimeUnit arg1)
abstract
void
awaitTerminated (long arg0, TimeUnit arg1)
abstract
void
awaitTerminated ()
abstract
Throwable
failureCause ()
abstract
boolean
isRunning ()
abstract
Service
startAsync ()
abstract
Service.State
state ()
abstract
Service
stopAsync ()
Public Methods
public
abstract
ListenableFuture<Operation>
deleteItem
(String id, byte[] version, IndexingService.RequestMode requestMode)
Parameters
id
the item id.
version
the item version to compare against the previously stored item update version
requestMode
mode for delete request
Throws
IOException
when service throws an exception.
public
abstract
ListenableFuture<Operation>
deleteQueueItems
(String name)
Deletes items from a queue.
Returns
ListenableFuture
that the caller uses to obtain the result of a
delete queue items operation (using get()
).
Throws
IOException
when the service throws an exception
public
abstract
Item
getItem
(String id)
Returns
the item or null
if not found
Throws
IOException
when service throws exception
public
abstract
Operation
getOperation
(String name)
Returns
the Operation object describing the current state of the long-running operation
Throws
IOException
when service throws exception
public
abstract
Schema
getSchema
()
Gets the Schema
defined within the connected data source.
Each data source may have at most one schema defined within it. This method extracts the
schema definition to use with the current connector's data repository.
Returns
Schema
defined within the connected data source
Throws
IOException
when service throws exception
public
abstract
ListenableFuture<Operation>
indexItem
(Item item, IndexingService.RequestMode requestMode)
Sends an Item
for indexing.
Throws
IOException
when service throws exception
public
abstract
ListenableFuture<Operation>
indexItemAndContent
(Item item, AbstractInputStreamContent content, String contentHash, IndexingService.ContentFormat contentFormat, IndexingService.RequestMode requestMode)
Sends an Item
and associated content for indexing.
Parameters
item
the item
content
the item's content
contentHash
the hash of the item's content
contentFormat
requestMode
IndexingService.RequestMode
for Item
index request
Throws
IOException
when service throws exception
public
abstract
Iterable<Item>
listItem
(boolean brief)
Fetches the first of what may be many sets of Item
.
Parameters
brief
true
to shorten Item
metadata, default: true
Returns
an iterator for the returned set of Item
Throws
IOException
when service throws exception
public
abstract
List<Item>
poll
(PollItemsRequest pollQueueRequest)
Fetches Item
entries from the queue using custom API parameters.
Parameters
pollQueueRequest
the user created and populated poll request
Throws
IOException
when service throws exception
public
abstract
Iterable<Item>
pollAll
(PollItemsRequest pollQueueRequest)
Fetches all of the Item
entries repeatedly from the queue until the entire queue is
exhausted.
Parameters
pollQueueRequest
the user created and populated poll request
Returns
an iterator for items returned from the queue
Throws
IOException
when service throws exception
public
abstract
ListenableFuture<Item>
push
(String id, PushItem pushItem)
Pushes a PushItem
object to indexing API Queue.
Parameters
id
the item id
pushItem
the item to push
Throws
IOException
when service throws exception
public
abstract
UploadItemRef
startUpload
(String itemId)
Parameters
itemId
for which upload reference to be created.
Throws
IOException
when service throws exception
public
abstract
ListenableFuture<Operation>
unreserve
(String queue)
Unreserves previously polled Item
entries in a specific queue.
When a connector issues a poll(PollItemsRequest)
of the indexing queue, the
returned Item
entries are marked internally as reserved so that they are
unavailable for a future poll(PollItemsRequest)
request. This prevents two possibly
different threads from processing the same Item
. This method allows the connector to
reset the queue to make all of its entries available again.
Parameters
queue
the queue to unreserve, (null
for default queue)
Throws
IOException
when service throws exception
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-03 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-03 UTC."],[],[]]