Interface CustomerService
-
- All Known Implementing Classes:
DefaultCustomerService
public interface CustomerServiceService to interact with Customer service to retrieve customers for indexing.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<String>readBatchOfCustomerIds(String startId, int batchSize)Reads a batch of IDs to be placed in a queue for processing.List<com.broadleafcommerce.search.customer.core.domain.Customer>readBatchOfCustomers(List<String> ids)Reads a batch ofCustomersby their IDs.Optional<com.broadleafcommerce.search.customer.core.domain.Customer>readCustomer(String id)Reads a batch ofCustomersby their IDs.
-
-
-
Method Detail
-
readBatchOfCustomerIds
List<String> readBatchOfCustomerIds(@Nullable String startId, int batchSize) throws com.broadleafcommerce.search.api.SearchIndexException
Reads a batch of IDs to be placed in a queue for processing.- Parameters:
startId- The starting IDbatchSize- The size of the batch- Returns:
- A list of customer IDs.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException- if reading the customer ids fails.
-
readBatchOfCustomers
List<com.broadleafcommerce.search.customer.core.domain.Customer> readBatchOfCustomers(List<String> ids) throws com.broadleafcommerce.search.api.SearchIndexException
Reads a batch ofCustomersby their IDs.- Parameters:
ids- A list of customer IDs.- Returns:
- A list of customers or an empty list.
- Throws:
com.broadleafcommerce.search.api.SearchIndexException- if reading the customer fails.
-
readCustomer
Optional<com.broadleafcommerce.search.customer.core.domain.Customer> readCustomer(String id) throws com.broadleafcommerce.search.api.SearchIndexException
Reads a batch ofCustomersby their IDs.- Parameters:
id- A customer id- Returns:
- A customer optional or
Optional.empty() - Throws:
com.broadleafcommerce.search.api.SearchIndexException- if reading the customer fails.
-
-