BatchApiOperation

public class BatchApiOperation extends Object
implements ApiOperation Iterable<ApiOperation>

Container for a sequence of ApiOperation objects.

The Repository can return this object to perform multiple operations when required by the connector. This object calls the IndexingService object for each of its contained operations.

For example, if a getDoc(com.google.api.services.cloudsearch.v1.model.Item) method call determines that the requested document has some of its child documents missing from the data repository. A delete operation for each of these children can be concurrently sent in a batch operation along with the requested document's update operation.

This class implements Iterable, but the iterator and equals methods both exhaust the iterator and should only be used by tests.

Public Method Summary

boolean
equals(Object o)
Indicates whether another object is also a BatchApiOperation and iterates over the same objects.
List<GenericJson>
execute(IndexingService service)
Executes the specific API operation for the implemented class.
int
hashCode()
Gets a hash code for this object.
Iterator<ApiOperation>
iterator()
Gets an iterator over the ApiOperations.

Inherited Method Summary

Public Methods

public boolean equals (Object o)

Indicates whether another object is also a BatchApiOperation and iterates over the same objects. This implementation exhausts the iterators of both objects, and should only be used by tests.

Parameters
o

public List<GenericJson> execute (IndexingService service)

Executes the specific API operation for the implemented class.

Parameters
service the IndexingService instance on which to perform the action
Returns
  • the indexing service responses to each operation execution
Throws
IOException
InterruptedException

public int hashCode ()

Gets a hash code for this object. This implementation always returns the same value, in order to remain consistent with equals(Object) without exhausting the iterator.

Returns
  • a fixed hash code

public Iterator<ApiOperation> iterator ()

Gets an iterator over the ApiOperations. This implementation exhausts the iterator, and should only be used by tests.

Returns
  • an iterator on the first call
Throws
IllegalStateException if this method has been called on this instance before

Send feedback about...

Cloud Search
Cloud Search