Class UsageInfo
- java.lang.Object
- 
- jadex.platform.service.globalservicepool.UsageInfo
 
- 
 public class UsageInfo extends java.lang.ObjectInformation about service usage.
- 
- 
Field SummaryFields Modifier and Type Field Description protected IServiceIdentifiersidThe service id.protected longstarttimeThe start time.protected doubleusagesThe number of usages in the last time interval.
 - 
Constructor SummaryConstructors Constructor Description UsageInfo()Create a new UsageInfo.UsageInfo(IServiceIdentifier sid, long starttime, double usages)Create a new UsageInfo.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doublecalculateEma(double newval, double val)Calculate the exponential moving average.IServiceIdentifiergetServiceIdentifier()Get the serviceIdentifier.longgetStartTime()Get the startTime.doublegetUsages()Get the usages.voidintegrateUsage(UsageInfo ui)Integrate a new usage info.voidsetServiceIdentifier(IServiceIdentifier sid)Set the serviceIdentifier.voidsetStartTime(long startTime)Set the startTime.voidsetUsages(double usages)Set the usages.
 
- 
- 
- 
Field Detail- 
sidprotected IServiceIdentifier sid The service id.
 - 
starttimeprotected long starttime The start time.
 - 
usagesprotected double usages The number of usages in the last time interval.
 
- 
 - 
Constructor Detail- 
UsageInfopublic UsageInfo() Create a new UsageInfo.
 - 
UsageInfopublic UsageInfo(IServiceIdentifier sid, long starttime, double usages) Create a new UsageInfo.
 
- 
 - 
Method Detail- 
getServiceIdentifierpublic IServiceIdentifier getServiceIdentifier() Get the serviceIdentifier.- Returns:
- the serviceIdentifier
 
 - 
getStartTimepublic long getStartTime() Get the startTime.- Returns:
- the startTime
 
 - 
setStartTimepublic void setStartTime(long startTime) Set the startTime.- Parameters:
- startTime- The startTime to set
 
 - 
setServiceIdentifierpublic void setServiceIdentifier(IServiceIdentifier sid) Set the serviceIdentifier.- Parameters:
- sid- The serviceIdentifier to set
 
 - 
getUsagespublic double getUsages() Get the usages.- Returns:
- the usages
 
 - 
setUsagespublic void setUsages(double usages) Set the usages.- Parameters:
- usages- The usages to set
 
 - 
integrateUsagepublic void integrateUsage(UsageInfo ui) Integrate a new usage info. Uses ema to average the values.
 - 
calculateEmaprotected double calculateEma(double newval, double val)Calculate the exponential moving average.
 
- 
 
-