Skip to content
Snippets Groups Projects
  • Matt Jordan's avatar
    ef8d3f65
    bucket: Add clone/staleness operations for ast_bucket/ast_bucket_file · ef8d3f65
    Matt Jordan authored
    This patch enhances the bucket API in two ways.
    
    First, since ast_bucket and ast_bucket_file instances are immutable, a 'clone'
    operation has been added that provides a 'clone' of an existing
    ast_bucket/ast_bucket_file object. Note that this makes use of the
    ast_sorcery_copy operation, along with the copy callback handler on the
    "bucket" and "file" object types for the bucket sorcery instance.
    
    Second, there is a need for the bucket API to ask a wizard if an object
    is stale. This is particularly useful with the upcoming media cache
    enhancements, where we want to ask the backing data storage if the
    object we are currently operating on has known updates. This patch adds
    API calls for ast_bucket and ast_bucket_file objects, which callback
    into their respective sorcery wizards via the sorcery API.
    
    Unit tests have also been added to cover the respective
    ast_bucket/ast_bucket_file clone and staleness operations.
    
    Change-Id: Ib0240ba915ece313f1678a085a716021d75d6b4a
    ef8d3f65
    History
    bucket: Add clone/staleness operations for ast_bucket/ast_bucket_file
    Matt Jordan authored
    This patch enhances the bucket API in two ways.
    
    First, since ast_bucket and ast_bucket_file instances are immutable, a 'clone'
    operation has been added that provides a 'clone' of an existing
    ast_bucket/ast_bucket_file object. Note that this makes use of the
    ast_sorcery_copy operation, along with the copy callback handler on the
    "bucket" and "file" object types for the bucket sorcery instance.
    
    Second, there is a need for the bucket API to ask a wizard if an object
    is stale. This is particularly useful with the upcoming media cache
    enhancements, where we want to ask the backing data storage if the
    object we are currently operating on has known updates. This patch adds
    API calls for ast_bucket and ast_bucket_file objects, which callback
    into their respective sorcery wizards via the sorcery API.
    
    Unit tests have also been added to cover the respective
    ast_bucket/ast_bucket_file clone and staleness operations.
    
    Change-Id: Ib0240ba915ece313f1678a085a716021d75d6b4a