public interface SessionCounter extends com.opencloud.rhino.cmp.Encodable, DirtyMonitor
SessionCounter
contains the charging counters related to a
unique SessionCounterAddress
set of key/value pairs and provide
methods for incrementing the various charging counters and getting the
current values.Modifier and Type | Method and Description |
---|---|
SessionCounterAddress |
getAddress()
Gets the name/value pairs which uniquely label this SessionCounter.
|
long |
getCumulativeCommittedUsed()
Gets the cumulative value of this counter's 'committedUsed' field.
|
long |
getCumulativeGranted()
Get the cumulative value of this counter's 'granted' field.
|
long |
getCumulativeGrantedRefund()
Get the cumulative value of this counter's 'grantedRefund' field.
|
long |
getCumulativeRequested()
Get the cumulative value of this counter's 'requested' field.
|
long |
getCumulativeRequestedRefund()
Get the cumulative value of this counter's 'requestedRefund' field.
|
long |
getCumulativeSentUsed()
Get the cumulative value of this counter's 'sentUsed' field.
|
long |
getCumulativeSuspendedDuration()
Get the cumulative value of this counter's 'CumulativeSuspendedDuration' field.
|
long |
getEndTime()
The end time is recorded when the session ceases consuming units.
|
long |
getGrantedUnitsValidityExpiry()
Unit validity expiry is the time until which the latest granted units are valid.
|
long |
getPendingRequested()
Gets the value of the 'pendingRequested' field.
|
long |
getReportedUsed()
Gets the value of the 'reportedUsed' field.
|
long |
getStartTime()
The start time is recorded when the session starts consuming units
For instance, when the session is established.
|
long |
getSuspensionStartTime()
The suspension start time value is the time the session counter is suspended by
a charging instance, which may be at creation.
|
void |
increment(SessionCounter sessionCounter)
Increment all session counter fields based on a
SessionCounter . |
void |
incrementCumulativeCommittedUsed(long committedUsed)
Increment the value of this counter's 'committedUsed' field.
|
void |
incrementCumulativeGranted(long granted)
Increment the value of this counter's 'granted' field.
|
void |
incrementCumulativeGrantedRefund(long granted)
Increment the value of this counter's 'grantedRefund' field.
|
void |
incrementCumulativeRequested(long requested)
Increment the value of this counter's 'requested' field.
|
void |
incrementCumulativeRequestedRefund(long requestedRefund)
Increment the value of this counter's 'requestedRefund' field.
|
void |
incrementCumulativeSentUsed(long sentUsed)
Increment the value of this counter's 'sentUsed' field.
|
void |
incrementCumulativeSuspendedDuration(long suspendedDurationMillis)
Increment the value of this counter's 'CumulativeSuspendedDuration' field.
|
void |
setEndTime(long endTimeMillis)
The end time is recorded when the session ceases consuming units.
|
void |
setGrantedUnitsValidityExpiry(long unitsValidityExpiryMillis)
Unit validity expiry is the time until which the latest granted units are valid.
|
void |
setPendingRequested(long pendingRequested)
Sets the value of the 'pendingRequested' field.
|
void |
setReportedUsed(long reportedUsed)
Sets the value of the 'reportedUsed' field.
|
void |
setStartTime(long startTimeMillis)
The start time is recorded when the session starts consuming units
For instance, when the session is established.
|
isDirtyAndClear
SessionCounterAddress getAddress()
SessionCounterAddress
that uniquely label this
SessionCounter
.long getReportedUsed()
void setReportedUsed(long reportedUsed)
reportedUsed
- set the value of the 'reportedUsed' field.long getPendingRequested()
void setPendingRequested(long pendingRequested)
pendingRequested
- value to setlong getCumulativeSentUsed()
void incrementCumulativeSentUsed(long sentUsed)
sentUsed
- the value of this counter's 'sentUsed' field to increment.long getCumulativeCommittedUsed()
void incrementCumulativeCommittedUsed(long committedUsed)
committedUsed
- the value of this counter's 'committedUsed' field to increment by.long getCumulativeRequested()
void incrementCumulativeRequested(long requested)
requested
- the value of this counter's 'requested' field to increment by.long getCumulativeGranted()
void incrementCumulativeGranted(long granted)
granted
- the value of this counter's 'granted' field to increment by.long getCumulativeRequestedRefund()
void incrementCumulativeRequestedRefund(long requestedRefund)
requestedRefund
- the value of this counter's 'requestedRefund' field to increment by.long getCumulativeGrantedRefund()
void incrementCumulativeGrantedRefund(long granted)
granted
- the value of this counter's 'grantedRefund' field to increment by.void increment(SessionCounter sessionCounter)
SessionCounter
.sessionCounter
- the session counter to increment by.void setStartTime(long startTimeMillis)
startTimeMillis
- start time in milliseconds since the standard base time known as
"the epoch", namely January 1, 1970, 00:00:00 GMT.long getStartTime()
void setEndTime(long endTimeMillis)
end
- time in milliseconds since the standard base time known as
"the epoch", namely January 1, 1970, 00:00:00 GMT.long getEndTime()
long getSuspensionStartTime()
long getCumulativeSuspendedDuration()
void incrementCumulativeSuspendedDuration(long suspendedDurationMillis)
suspendedDuration
- the amount to increment this counter's 'CumulativeSuspendedDuration' field by in milliseconds.long getGrantedUnitsValidityExpiry()
void setGrantedUnitsValidityExpiry(long unitsValidityExpiryMillis)
Copyright © OpenCloud. All Rights Reserved.