Class BatchIndexRequest
java.lang.Object
com.broadleafcommerce.data.tracking.core.messaging.search.domain.BatchIndexRequest
- All Implemented Interfaces:
Serializable
Message object used to inform the solr index service of a large list of
Indexable
objects
to index. Supported types are defined in BatchIndexableType
.- Author:
- Jeff Fischer
- See Also:
-
Constructor Summary
ConstructorDescriptionBatchIndexRequest
(@NonNull String idPayload, @NonNull String batchIndexableType) This constructor is required for JSON deserialization.BatchIndexRequest
(@NonNull List<String> ids, @NonNull BatchIndexableType batchIndexableType) This constructor is used to construct a BatchIndexRequest with a list of IDs that are to be indexed, and a String representation of the batch indexable type (e.g.BatchIndexRequest
(@NonNull List<String> ids, @NonNull String batchIndexableType) This constructor is used to construct a BatchIndexRequest with a list of IDs that are to be indexed, and a String representation of the batch indexable type (e.g. -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The string representation of the validBatchIndexableType
The ids representing the items that should be indexed.getIds()
Returns a decompressed, decoded list of Strings.int
hashCode()
toString()
-
Constructor Details
-
BatchIndexRequest
public BatchIndexRequest(@NonNull @NonNull List<String> ids, @NonNull @NonNull BatchIndexableType batchIndexableType) This constructor is used to construct a BatchIndexRequest with a list of IDs that are to be indexed, and a String representation of the batch indexable type (e.g. 'PRODUCT'). This constructor GZip compresses the list of IDs and then Base64 encodes them for serialization so that IDs are not serialized as a list or array, but rather as a Base64 encoded, compressed string.- Parameters:
ids
- A list of IDs to be (re)indexedbatchIndexableType
- The enum representation of a batch indexable type (e.g.BatchIndexableType.PRODUCT
)
-
BatchIndexRequest
public BatchIndexRequest(@NonNull @NonNull List<String> ids, @NonNull @NonNull String batchIndexableType) This constructor is used to construct a BatchIndexRequest with a list of IDs that are to be indexed, and a String representation of the batch indexable type (e.g. 'PRODUCT'). This constructor GZip compresses the list of IDs and then Base64 encodes them for serialization so that IDs are not serialized as a list or array, but rather as a Base64 encoded, compressed string.- Parameters:
ids
- A list of IDs to be (re)indexedbatchIndexableType
- The name of a batch indexable type (e.g. 'PRODUCT')
-
BatchIndexRequest
public BatchIndexRequest(@NonNull @NonNull String idPayload, @NonNull @NonNull String batchIndexableType) This constructor is required for JSON deserialization.- Parameters:
idPayload
- The Base64 representation of a GZip List of Strings.batchIndexableType
- The name of the batchIndexableType (e.g. 'PRODUCT')
-
-
Method Details
-
getIds
Returns a decompressed, decoded list of Strings. This is decoded from the idPayload. This value should not be serialized into JSON because the idPayload is already meant to be a representation of the IDs, except in a compressed format. Serializing the list of IDs would defeat the purpose of compressing them in the first place.- Returns:
-
getIdPayload
The ids representing the items that should be indexed. This is really a Base64 encoded GZip representation of a List of Strings. -
getBatchIndexableType
The string representation of the validBatchIndexableType
-
toString
-
equals
-
canEqual
-
hashCode
public int hashCode()
-