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 Type
    Method
    Description
    void
    delete(@NonNull String key)
    Deletes the metadata snapshot for an object.
    default boolean
    exists(@NonNull String key)
    Checks whether a metadata snapshot exists for an object.
    retrieve(@NonNull String key)
    Retrieves the stored metadata snapshot for an object.
    void
    save(@NonNull ObjectMetadataWrite write)
    Saves a metadata snapshot for an object.
  • Method Details

    • retrieve

      @NonNull Optional<ObjectMetadataEntry<T>> retrieve(@NonNull String key)
      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

      void save(@NonNull ObjectMetadataWrite write)
      Saves a metadata snapshot for an object.
      Parameters:
      write - The metadata snapshot to persist.
    • delete

      void delete(@NonNull String key)
      Deletes the metadata snapshot for an object.
      Parameters:
      key - The object key.
    • exists

      default boolean exists(@NonNull String key)
      Checks whether a metadata snapshot exists for an object.
      Parameters:
      key - The object key.
      Returns:
      true if metadata exists for the object.