Interface SessionCounters
-
- All Superinterfaces:
com.opencloud.rhino.cmp.Encodable
public interface SessionCounters extends com.opencloud.rhino.cmp.Encodable
SessionCounters provides access to the various SessionCounters which are current active for this set of charging sessions in a Sentinel session.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SessionCounter
add(SessionCounterAddress address)
Add a new SessionCounter to the SessionCounters instance or if a SessionCounter already exists for this address return the current SessionCounter.SessionCounter
get(SessionCounterAddress address)
java.util.Collection<SessionCounterAddress>
getAddresses()
SessionCounter
getAggregateSessionCounter(SessionCounterAddress addressSubset)
Aggregate all the values in a set of SessionCounters which have addresses which share all the key/values in the address provided as an argument.java.util.Collection<SessionCounter>
getSessionCounters()
java.util.Collection<SessionCounter>
getSessionCountersByAddressSubset(SessionCounterAddress addressSubset)
-
-
-
Method Detail
-
getAddresses
java.util.Collection<SessionCounterAddress> getAddresses()
- Returns:
- a collection of all SessionCountAddresses used in this SessionCounters instance.
-
add
SessionCounter add(SessionCounterAddress address)
Add a new SessionCounter to the SessionCounters instance or if a SessionCounter already exists for this address return the current SessionCounter.- Returns:
- the new SessionCounter which has been added to the list of SessionCounters
-
get
SessionCounter get(SessionCounterAddress address) throws SessionCounterAddressNotFound
- Returns:
- the SessionCounter for the provided SessionCounter address
- Throws:
SessionCounterAddressNotFound
- if there is no SessionCounter instance with this address
-
getSessionCounters
java.util.Collection<SessionCounter> getSessionCounters()
- Returns:
- an unmodifiable collection of SessionCounter
-
getSessionCountersByAddressSubset
java.util.Collection<SessionCounter> getSessionCountersByAddressSubset(SessionCounterAddress addressSubset)
- Returns:
- the SessionCounters which match all of the key values of the addressSubset argument
-
getAggregateSessionCounter
SessionCounter getAggregateSessionCounter(SessionCounterAddress addressSubset)
Aggregate all the values in a set of SessionCounters which have addresses which share all the key/values in the address provided as an argument. For example, an addressSubset argument of SessionCounterAddress[Service-Id=1] will aggregate SessionCounters with addresses SessionCounterAddress[Service-Id=1,Rating-Group=1,Unit-Type=TIME] and SessionCounterAddress[Service-Id=1,Rating-Group=2,Unit-Type=TIME] If the addressSubset argument is the empty case SessionCounterAddress[] will return an aggregate with the sum of all SessionCounter instances- Returns:
- an aggregate SessionCounter of all SessionCounters which match all of the key values provided addressSubset argument
-
-