Interface SessionCounter

  • All Superinterfaces:
    DirtyMonitor, com.opencloud.rhino.cmp.Encodable

    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.
    • Method Detail

      • getAddress

        SessionCounterAddress getAddress()
        Gets the name/value pairs which uniquely label this SessionCounter.
        Returns:
        the SessionCounterAddress that uniquely label this SessionCounter.
      • getReportedUsed

        long getReportedUsed()
        Gets the value of the 'reportedUsed' field.
        Returns:
        the value of the 'reportedUsed' field.
      • setReportedUsed

        void setReportedUsed​(long reportedUsed)
        Sets the value of the 'reportedUsed' field.
        Parameters:
        reportedUsed - set the value of the 'reportedUsed' field.
      • getPendingRequested

        long getPendingRequested()
        Gets the value of the 'pendingRequested' field.
        Returns:
        the value of the 'pendingRequested' field.
      • setPendingRequested

        void setPendingRequested​(long pendingRequested)
        Sets the value of the 'pendingRequested' field.
        Parameters:
        pendingRequested - value to set
      • getCumulativeSentUsed

        long getCumulativeSentUsed()
        Get the cumulative value of this counter's 'sentUsed' field.
        Returns:
        the cumulative value of this counter's 'sentUsed' field.
      • incrementCumulativeSentUsed

        void incrementCumulativeSentUsed​(long sentUsed)
        Increment the value of this counter's 'sentUsed' field.
        Parameters:
        sentUsed - the value of this counter's 'sentUsed' field to increment.
      • getCumulativeCommittedUsed

        long getCumulativeCommittedUsed()
        Gets the cumulative value of this counter's 'committedUsed' field.
        Returns:
        the cumulative value of this counter's 'committedUsed' field.
      • incrementCumulativeCommittedUsed

        void incrementCumulativeCommittedUsed​(long committedUsed)
        Increment the value of this counter's 'committedUsed' field.
        Parameters:
        committedUsed - the value of this counter's 'committedUsed' field to increment by.
      • getCumulativeRequested

        long getCumulativeRequested()
        Get the cumulative value of this counter's 'requested' field.
        Returns:
        the cumulative value of this counter's 'requested' field.
      • incrementCumulativeRequested

        void incrementCumulativeRequested​(long requested)
        Increment the value of this counter's 'requested' field.
        Parameters:
        requested - the value of this counter's 'requested' field to increment by.
      • getCumulativeGranted

        long getCumulativeGranted()
        Get the cumulative value of this counter's 'granted' field.
        Returns:
        the cumulative value of this counter's 'granted' field.
      • incrementCumulativeGranted

        void incrementCumulativeGranted​(long granted)
        Increment the value of this counter's 'granted' field.
        Parameters:
        granted - the value of this counter's 'granted' field to increment by.
      • getCumulativeRequestedRefund

        long getCumulativeRequestedRefund()
        Get the cumulative value of this counter's 'requestedRefund' field.
        Returns:
        the cumulative value of this counter's 'requestedRefund' field.
      • incrementCumulativeRequestedRefund

        void incrementCumulativeRequestedRefund​(long requestedRefund)
        Increment the value of this counter's 'requestedRefund' field.
        Parameters:
        requestedRefund - the value of this counter's 'requestedRefund' field to increment by.
      • getCumulativeGrantedRefund

        long getCumulativeGrantedRefund()
        Get the cumulative value of this counter's 'grantedRefund' field.
        Returns:
        the cumulative value of this counter's 'grantedRefund' field.
      • incrementCumulativeGrantedRefund

        void incrementCumulativeGrantedRefund​(long granted)
        Increment the value of this counter's 'grantedRefund' field.
        Parameters:
        granted - the value of this counter's 'grantedRefund' field to increment by.
      • increment

        void increment​(SessionCounter sessionCounter)
        Increment all session counter fields based on a SessionCounter.
        Parameters:
        sessionCounter - the session counter to increment by.
      • setStartTime

        void setStartTime​(long startTimeMillis)
        The start time is recorded when the session starts consuming units For instance, when the session is established. Until this point the value will be -1 to indicate that it is unset.
        Parameters:
        startTimeMillis - start time in milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
      • getStartTime

        long getStartTime()
        The start time is recorded when the session starts consuming units For instance, when the session is established. Until this point the value will be -1 to indicate that it is unset.
        Returns:
        start time in milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
      • setEndTime

        void setEndTime​(long endTimeMillis)
        The end time is recorded when the session ceases consuming units. For instance, when the session being charged is terminated. Until this point the value will be -1 to indicate that it is unset
        Parameters:
        end - time in milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
      • getEndTime

        long getEndTime()
        The end time is recorded when the session ceases consuming units. For instance, when the session being charged is terminated. Until this point the value will be -1 to indicate that it is unset
        Returns:
        end time in milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
      • getSuspensionStartTime

        long getSuspensionStartTime()
        The suspension start time value is the time the session counter is suspended by a charging instance, which may be at creation.
        Returns:
        the value of the 'suspensionStartTime' field in milliseconds from the epoch
      • getCumulativeSuspendedDuration

        long getCumulativeSuspendedDuration()
        Get the cumulative value of this counter's 'CumulativeSuspendedDuration' field. Indicates the total number of units used whenever charging was suspended.
        Returns:
        the cumulative value of this counter's 'CumulativeSuspendedDuration' field in milliseconds.
      • incrementCumulativeSuspendedDuration

        void incrementCumulativeSuspendedDuration​(long suspendedDurationMillis)
        Increment the value of this counter's 'CumulativeSuspendedDuration' field. Indicates the total number of units used while charging was suspended.
        Parameters:
        suspendedDuration - the amount to increment this counter's 'CumulativeSuspendedDuration' field by in milliseconds.
      • getGrantedUnitsValidityExpiry

        long getGrantedUnitsValidityExpiry()
        Unit validity expiry is the time until which the latest granted units are valid.
        Returns:
        the value of the 'grantedUnitsValidityExpirty' field in milliseconds from the epoch.
      • setGrantedUnitsValidityExpiry

        void setGrantedUnitsValidityExpiry​(long unitsValidityExpiryMillis)
        Unit validity expiry is the time until which the latest granted units are valid.