Interface ObjectMetadataOperations<T>
- Type Parameters:
T- The provider-native metadata representation type.
public interface ObjectMetadataOperations<T>
Portable metadata persistence contract for stored objects.
This contract is intentionally additive and does not widen
ObjectStorageOperations. Implementations may persist metadata in a store that is separate
from the raw object content.
save(ObjectMetadataWrite) uses replace/upsert semantics for the portable metadata
snapshot. delete(String) is idempotent.
- Since:
- 3.0.0
- Author:
- Álvaro Sánchez-Mariscal
-
Method Summary
Modifier and TypeMethodDescriptionvoidDeletes the metadata snapshot for an object.default booleanChecks whether a metadata snapshot exists for an object.@NonNull Optional<ObjectMetadataEntry<T>> Retrieves the stored metadata snapshot for an object.voidsave(@NonNull ObjectMetadataWrite write) Saves a metadata snapshot for an object.
-
Method Details
-
retrieve
Retrieves the stored metadata snapshot for an object.- Parameters:
key- The object key.- Returns:
- The metadata entry, or
Optional.empty()if no metadata snapshot exists.
-
save
Saves a metadata snapshot for an object.- Parameters:
write- The metadata snapshot to persist.
-
delete
Deletes the metadata snapshot for an object.- Parameters:
key- The object key.
-
exists
Checks whether a metadata snapshot exists for an object.- Parameters:
key- The object key.- Returns:
trueif metadata exists for the object.
-