Package com.github.ambry.cloud
Interface CloudUpdateValidator
-
public interface CloudUpdateValidator
Interface for Ambry validation logic for updates requested from cloud destination.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
validateUpdate(CloudBlobMetadata metadata, com.github.ambry.store.StoreKey key, java.util.Map<java.lang.String,java.lang.Object> updateFields)
Validate the sanity of update operation on givenupdateFields
against existingCloudBlobMetadata
in cloud destination for the blob with keykey
.
-
-
-
Method Detail
-
validateUpdate
boolean validateUpdate(CloudBlobMetadata metadata, com.github.ambry.store.StoreKey key, java.util.Map<java.lang.String,java.lang.Object> updateFields) throws com.github.ambry.store.StoreException
Validate the sanity of update operation on givenupdateFields
against existingCloudBlobMetadata
in cloud destination for the blob with keykey
. This can be used to hook Ambry store related validation logic duringCloudDestination
specific get-check-update flow. Note that this method can also update some fields within the map.- Parameters:
metadata
-CloudBlobMetadata
object obtained from cloud destination.key
-StoreKey
of the blob being updated.updateFields
-Map
of fields and new values requested for update.- Returns:
- true if the operation can proceed, or false if the operation is not needed.
- Throws:
com.github.ambry.store.StoreException
- if validation fails.
-
-