Interface UsageDAO

All Known Implementing Classes:
AbstractUsageDAOImpl, UsageDAOImpl

public interface UsageDAO
This provides basic services such as caching, but defers to the underlying implementation for CRUD operations. alf_usage_delta
Since:
3.4
Author:
janv
  • Method Details

    • insertDelta

      void insertDelta(NodeRef usageNodeRef, long deltaSize)
      Create a usage delta entry.
      Parameters:
      deltaSize - the size change
    • getTotalDeltaSize

      long getTotalDeltaSize(NodeRef nodeRef, boolean removeDeltas)
      Get the total delta size for a node.
      Parameters:
      nodeRef - the node reference
      removeDeltas - true to remove the deltas before returning the result.
      Returns:
      sum of delta sizes (in bytes) - can be +ve or -ve
    • getUsageDeltaNodes

      Set<NodeRef> getUsageDeltaNodes()
    • deleteDeltas

      int deleteDeltas(NodeRef nodeRef)
      Delete usage deltas for given nodeRef
      Parameters:
      nodeRef - NodeRef
      Returns:
      int
    • deleteDeltas

      int deleteDeltas(long nodeId)
      Delete usage deltas for given node entity id
      Parameters:
      nodeId - long
      Returns:
      int
    • getUserContentSizesForStore

      void getUserContentSizesForStore(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
      New style content urls - Iterate and sum all content node sizes for user (owner/creator)
      Parameters:
      storeRef - the store to search in
      resultsCallback - the callback to use while iterating over the content sizes (one row per user)
    • getUsersWithoutUsage

      void getUsersWithoutUsage(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
      Iterate over all person nodes to get users without a calculated usage
      Parameters:
      storeRef - the store to search in
      resultsCallback - the callback to use while iterating over the people
    • getUsersWithUsage

      void getUsersWithUsage(StoreRef storeRef, UsageDAO.MapHandler resultsCallback)
      Iterate over all person nodes to get users with a calculated usage
      Parameters:
      storeRef - the store to search in
      resultsCallback - the callback to use while iterating over the people
    • getContentSizeForStoreForUser

      Long getContentSizeForStoreForUser(StoreRef storeRef, String userName)
      Get user with a calculated usage
      Parameters:
      storeRef - the store to search in
      userName - the username
      Returns:
      Returns ussage