|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wso2.carbon.core.AbstractAdmin
org.wso2.carbon.usage.agent.services.CustomMeteringService
public class CustomMeteringService
CustomMeteringService class defines methods to get recorded duration, to check whether usage entries exists, persist usage, retrieve usage and add usage.
| Field Summary |
|---|
| Fields inherited from class org.wso2.carbon.core.AbstractAdmin |
|---|
axisConfig, configurationContext |
| Constructor Summary | |
|---|---|
CustomMeteringService()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class org.wso2.carbon.core.AbstractAdmin |
|---|
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomMeteringService()
| Method Detail |
|---|
public String[] getRecordedDurations(String measurement)
throws Exception
measurement - the measurement name
Exception
public boolean isUsageEntryExists(String duration,
String measurement)
throws Exception
duration - durationmeasurement - measurement name
Exception
public void persistUsage(String duration,
String measurement,
String value)
throws Exception
duration - measurement - measurement namevalue - value of measurement
Exception
public String retrieveUsage(String duration,
String measurement)
throws UsageException
duration - measurement - measurement name
UsageException
public long addUsage(String userName,
String duration,
String measurement,
long value)
throws Exception
userName - user nameduration - duration of the measurementmeasurement - measurement namevalue - usage value
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||