public class CustomMeteringService
extends org.wso2.carbon.core.AbstractAdmin
Constructor and Description |
---|
CustomMeteringService() |
Modifier and Type | Method and Description |
---|---|
long |
addUsage(String userName,
String duration,
String measurement,
long value)
method to add usage entries
|
String[] |
getRecordedDurations(String measurement)
method to get recorded durations
|
boolean |
isUsageEntryExists(String duration,
String measurement)
method to check whether usage entry exists or not
|
void |
persistUsage(String duration,
String measurement,
String value)
method to persist usage
|
String |
retrieveUsage(String duration,
String measurement)
method to retrieve usage
|
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
public String[] getRecordedDurations(String measurement) throws Exception
measurement
- the measurement nameException
public boolean isUsageEntryExists(String duration, String measurement) throws Exception
duration
- durationmeasurement
- measurement nameException
public void persistUsage(String duration, String measurement, String value) throws Exception
duration
- measurement
- measurement namevalue
- value of measurementException
public String retrieveUsage(String duration, String measurement) throws UsageException
duration
- measurement
- measurement nameUsageException
public long addUsage(String userName, String duration, String measurement, long value) throws Exception
userName
- user nameduration
- duration of the measurementmeasurement
- measurement namevalue
- usage valueException
Copyright © 2018 WSO2. All rights reserved.