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, setPermissionUpdateTimestamppublic String[] getRecordedDurations(String measurement) throws Exception
measurement - the measurement nameExceptionpublic boolean isUsageEntryExists(String duration, String measurement) throws Exception
duration - durationmeasurement - measurement nameExceptionpublic void persistUsage(String duration, String measurement, String value) throws Exception
duration - measurement - measurement namevalue - value of measurementExceptionpublic String retrieveUsage(String duration, String measurement) throws UsageException
duration - measurement - measurement nameUsageExceptionpublic long addUsage(String userName, String duration, String measurement, long value) throws Exception
userName - user nameduration - duration of the measurementmeasurement - measurement namevalue - usage valueExceptionCopyright © 2019 WSO2. All rights reserved.