Interface StorageUsageRefresher


  • public interface StorageUsageRefresher
    An interface to initialize the storage usage of each container and save them in memory. It should also refresh the in memory cache if there is any change of storage usage.
    • Method Detail

      • getContainerStorageUsage

        java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.Long>> getContainerStorageUsage()
                                                                                                                     throws java.lang.Exception
        Return the current storage usage for each container. The returned map should be structured as such: The key of the map is the account id in string format and the value of the map is the storage usage of each container under this account. The container usage map's key is the container is in string format, and the value is storage usage of this container.
        Returns:
        The current storage usage for each container.
        Throws:
        java.lang.Exception
      • registerListener

        void registerListener​(StorageUsageRefresher.Listener listener)
        Register your listener to StorageUsageRefresher. A refresher should only have one callback and it can't be registered multiple times.
        Parameters:
        listener - The listener to register.