public static class KeyedBudgetManager.AcquisitionResult<K> extends Object
The result of acquisition is either success: isSuccess() and this class contains
acquired budget/pages per key: getAcquiredPerKey() or
it is failure: isFailure() and this class contains total max available budget for all
queried keys: getTotalAvailableForAllQueriedKeys() which was not enough to
acquire the requested number of pages.
| Modifier and Type | Method and Description |
|---|---|
static <K> KeyedBudgetManager.AcquisitionResult<K> |
failure(long totalAvailableBudgetForAllQueriedKeys) |
Map<K,Long> |
getAcquiredPerKey() |
long |
getTotalAvailableForAllQueriedKeys() |
boolean |
isFailure() |
boolean |
isSuccess() |
static <K> KeyedBudgetManager.AcquisitionResult<K> |
success(Map<K,Long> acquiredBudgetPerKey) |
public static <K> KeyedBudgetManager.AcquisitionResult<K> success(Map<K,Long> acquiredBudgetPerKey)
public static <K> KeyedBudgetManager.AcquisitionResult<K> failure(long totalAvailableBudgetForAllQueriedKeys)
public boolean isSuccess()
public boolean isFailure()
public long getTotalAvailableForAllQueriedKeys()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.