Metered
Leave feedback
On this page
Inheritance: java.lang.Object
public final class Metered
Provides methods to set metered key.
In this example, an attempt will be made to set metered public and private key:
```
Metered metered = new Metered();
metered.setMeteredKey("PublicKey", "PrivateKey");
```
| Method | Description |
|---|---|
| setMeteredKey(String publicKey, String privateKey) | Sets metered public and private key. |
| getConsumptionQuantity() | Retrieves amount of MBs processed. |
| getConsumptionCredit() | Retrieves count of credits consumed. |
public Metered()
Initializes a new instance of the Metered class.
public final void setMeteredKey(String publicKey, String privateKey)
Sets metered public and private key.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| publicKey | java.lang.String | A public key. |
| privateKey | java.lang.String | A private key |
public static BigDecimal getConsumptionQuantity()
Retrieves amount of MBs processed.
Returns: java.math.BigDecimal - A double value that represents the consumption quantity.
public static BigDecimal getConsumptionCredit()
Retrieves count of credits consumed.
Returns: java.math.BigDecimal - A double value that represents the consumption credit.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.