com.google.enterprise.adaptor
Interface DocIdPusher


public interface DocIdPusher

Interface that allows at-will pushing of DocIds to the GSA.


Nested Class Summary
static class DocIdPusher.Record
          Immutable feed attributes for a document identified by its DocId.
 
Method Summary
 DocId pushDocIds(Iterable<DocId> docIds)
          Push DocIds immediately and block until they are successfully provided to the GSA or the error handler gives up.
 DocId pushDocIds(Iterable<DocId> docIds, ExceptionHandler handler)
          Push DocIds immediately and block until they are successfully provided to the GSA or the error handler gives up.
 GroupPrincipal pushGroupDefinitions(Map<GroupPrincipal,? extends Collection<Principal>> defs, boolean caseSensitive)
          Blocking call to push group definitions to GSA ends in success or when default error handler gives up.
 GroupPrincipal pushGroupDefinitions(Map<GroupPrincipal,? extends Collection<Principal>> defs, boolean caseSensitive, ExceptionHandler handler)
          Blocking call to push group definitions to GSA ends in success or when provided error handler gives up.
 DocId pushNamedResources(Map<DocId,Acl> resources)
          Push named resources immediately and block until they are successfully provided to the GSA or the error handler gives up.
 DocId pushNamedResources(Map<DocId,Acl> resources, ExceptionHandler handler)
          Push named resources immediately and block until they are successfully provided to the GSA or the error handler gives up.
 DocIdPusher.Record pushRecords(Iterable<DocIdPusher.Record> records)
          Push Records immediately and block until they are successfully provided to the GSA or the error handler gives up.
 DocIdPusher.Record pushRecords(Iterable<DocIdPusher.Record> records, ExceptionHandler handler)
          Push Records immediately and block until they are successfully provided to the GSA or the error handler gives up.
 

Method Detail

pushDocIds

DocId pushDocIds(Iterable<DocId> docIds)
                 throws InterruptedException
Push DocIds immediately and block until they are successfully provided to the GSA or the error handler gives up. This method can take a while in error conditions, but is not something that generally needs to be avoided.

Equivalent to pushDocIds(docIds, null) and pushRecords(Iterable) with default values for each Record.

Returns:
null on success, otherwise the first DocId to fail
Throws:
InterruptedException - if interrupted and no DocIds were sent
See Also:
pushDocIds(Iterable, ExceptionHandler)

pushDocIds

DocId pushDocIds(Iterable<DocId> docIds,
                 ExceptionHandler handler)
                 throws InterruptedException
Push DocIds immediately and block until they are successfully provided to the GSA or the error handler gives up. This method can take a while in error conditions, but is not something that generally needs to be avoided.

If handler is null, then a default error handler is used.

Equivalent to pushRecords(Iterable, ExceptionHandler) with default values for each Record.

Returns:
null on success, otherwise the first DocId to fail
Throws:
InterruptedException - if interrupted and no DocIds were sent

pushRecords

DocIdPusher.Record pushRecords(Iterable<DocIdPusher.Record> records)
                               throws InterruptedException
Push Records immediately and block until they are successfully provided to the GSA or the error handler gives up. This method can take a while in error conditions, but is not something that generally needs to be avoided.

Equivalent to pushRecords(records, null).

Returns:
null on success, otherwise the first Record to fail
Throws:
InterruptedException - if interrupted and no Records were sent
See Also:
pushRecords(Iterable, ExceptionHandler)

pushRecords

DocIdPusher.Record pushRecords(Iterable<DocIdPusher.Record> records,
                               ExceptionHandler handler)
                               throws InterruptedException
Push Records immediately and block until they are successfully provided to the GSA or the error handler gives up. This method can take a while in error conditions, but is not something that generally needs to be avoided.

If handler is null, then a default error handler is used.

Returns:
null on success, otherwise the first Record to fail
Throws:
InterruptedException - if interrupted and no Records were sent

pushNamedResources

DocId pushNamedResources(Map<DocId,Acl> resources)
                         throws InterruptedException
Push named resources immediately and block until they are successfully provided to the GSA or the error handler gives up. This method can take a while in error conditions, but is not something that generally needs to be avoided.

Named resources are DocIds without any content or metadata, that only exist for ACL inheritance. These DocId will never be visible to the user and have no meaning outside of ACL processing.

If you plan on using the return code, then the provided map should have a predictable iteration order, like TreeMap.

Equivalent to pushNamedResources(resources, null).

Returns:
null on success, otherwise the first DocId to fail
Throws:
InterruptedException - if interrupted and no resources were sent
See Also:
pushNamedResources(Map, ExceptionHandler)

pushNamedResources

DocId pushNamedResources(Map<DocId,Acl> resources,
                         ExceptionHandler handler)
                         throws InterruptedException
Push named resources immediately and block until they are successfully provided to the GSA or the error handler gives up. This method can take a while in error conditions, but is not something that generally needs to be avoided.

Named resources are DocIds without any content or metadata, that only exist for ACL inheritance. These DocId will never be visible to the user and have no meaning outside of ACL processing.

If you plan on using the return code, then the provided map should have a predictable iteration order, like TreeMap.

If handler is null, then a default error handler is used.

Returns:
null on success, otherwise the first DocId to fail
Throws:
InterruptedException - if interrupted and no resources were sent

pushGroupDefinitions

GroupPrincipal pushGroupDefinitions(Map<GroupPrincipal,? extends Collection<Principal>> defs,
                                    boolean caseSensitive)
                                    throws InterruptedException
Blocking call to push group definitions to GSA ends in success or when default error handler gives up. Can take significant time if errors arise.

A group definition consists of a group being defined and members, which is a list of users and groups.

If you plan on using the return code, then the provided map should have a predictable iteration order, like TreeMap.

Returns:
null on success, otherwise the first GroupPrincipal to fail
Throws:
InterruptedException - if interrupted and no definitions were sent

pushGroupDefinitions

GroupPrincipal pushGroupDefinitions(Map<GroupPrincipal,? extends Collection<Principal>> defs,
                                    boolean caseSensitive,
                                    ExceptionHandler handler)
                                    throws InterruptedException
Blocking call to push group definitions to GSA ends in success or when provided error handler gives up. Can take significant time if errors arise.

A group definition consists of a group being defined and members, which is a list of users and groups.

If you plan on using the return code, then the provided map should have a predictable iteration order, like TreeMap.

If handler is null, then a default error handler is used.

Returns:
null on success, otherwise the first GroupPrincipal to fail
Throws:
InterruptedException - if interrupted and no definitions were sent