Package com.github.ambry.quota.storage
Interface StorageQuotaSource
-
public interface StorageQuotaSource
The interface of the source of storage quota for each container.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
StorageQuotaSource.Listener
A listener interface registered withStorageQuotaSource
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>>
getContainerQuota()
Return the storage quota of each container.void
registerListener(StorageQuotaSource.Listener listener)
Register your listener toStorageQuotaSource
.
-
-
-
Method Detail
-
getContainerQuota
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Long>> getContainerQuota()
Return the storage quota of 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 quota of each container under this account. The container usage map's key is the container id in string format, and the value is storage quota in bytes of this container.- Returns:
- The storage quota for each container.
-
registerListener
void registerListener(StorageQuotaSource.Listener listener)
Register your listener toStorageQuotaSource
. A source should only have one callback and it can't be registered multiple times.- Parameters:
listener
- The listener to register.
-
-