Metered

Inheritance: java.lang.Object

public class Metered

Provides methods for applying Metered license. Learn moreMore about Metered licensing: Metered Licensing FAQMore about GroupDocs.Conversion licensing: Evaluation Limitations and Licensing

Constructors

Constructor Description
Metered()

Methods

Method Description
setMeteredKey(String publicKey, String privateKey) Activates product with Metered keys.
getConsumptionQuantity() Retrieves amount of MBs processed.
getConsumptionCredit() Retrieves count of credits consumed.
increaseBytesCount(long bytesCount)
consumeCreditsBySize(long bytesCount)

Metered()

public Metered()

setMeteredKey(String publicKey, String privateKey)

public final void setMeteredKey(String publicKey, String privateKey)

Activates product with Metered keys.


Following example demonstrates how to activate product with Metered keys.
 
 string publicKey = "Public Key";
 string privateKey = "Private Key";
 Metered metered = new Metered();
 metered.SetMeteredKey(publicKey, privateKey);

Parameters:

Parameter Type Description
publicKey java.lang.String The public key.
privateKey java.lang.String The private key.

getConsumptionQuantity()

public static BigDecimal getConsumptionQuantity()

Retrieves amount of MBs processed.


Following example demonstrates how to retrieve amount of MBs processed.
  
  string publicKey = "Public Key";
  string privateKey = "Private Key";

  Metered metered = new Metered();
  metered.SetMeteredKey(publicKey, privateKey);
  decimal mbProcessed = Metered.GetConsumptionQuantity();

Returns: java.math.BigDecimal

getConsumptionCredit()

public static BigDecimal getConsumptionCredit()

Retrieves count of credits consumed.


Following example demonstrates how to retrieve count of credits consumed.
  
  string publicKey = "Public Key";
  string privateKey = "Private Key";

  Metered metered = new Metered();
  metered.SetMeteredKey(publicKey, privateKey);
  decimal creditsConsumed = Metered.GetConsumptionCredit();

Returns: java.math.BigDecimal

increaseBytesCount(long bytesCount)

public static void increaseBytesCount(long bytesCount)

Parameters:

Parameter Type Description
bytesCount long

consumeCreditsBySize(long bytesCount)

public static void consumeCreditsBySize(long bytesCount)

Parameters:

Parameter Type Description
bytesCount long