Class DataVolume


  • public class DataVolume
    extends LimitedResource
    Data volume definition of the tenant resource limits.
    • Constructor Detail

      • DataVolume

        public DataVolume​(@HonoTimestamp
                          Instant effectiveSince,
                          ResourceLimitsPeriod period)
        Creates a new data volume specification for an instant in time and an accounting period definition.
        Parameters:
        effectiveSince - The point in time at which the limit became or will become effective.
        period - The definition of the accounting periods to be used for this specification or null to use the default period definition with mode "monthly".
        Throws:
        NullPointerException - if effectiveSince is null.
        IllegalArgumentException - if max bytes is < -1.
      • DataVolume

        public DataVolume​(@HonoTimestamp
                          Instant effectiveSince,
                          ResourceLimitsPeriod period,
                          long maxBytes)
        Creates a new data volume specification for an instant in time.
        Parameters:
        effectiveSince - The point in time at which the limit became or will become effective.
        period - The definition of the accounting periods to be used for this specification or null to use the default period definition with mode "monthly".
        maxBytes - The amount of data (in bytes) that devices of a tenant may transfer per accounting period. The value -1L can be used to indicate that the data volume should not be limited.
        Throws:
        NullPointerException - if effectiveSince is null.
        IllegalArgumentException - if max bytes is < -1.
    • Method Detail

      • getMaxBytes

        public final long getMaxBytes()
        Gets the amount of data that devices of a tenant may transfer per accounting period.

        The default value of this property is -1L which indicates that the data volume is unlimited.

        Returns:
        The amount of data in bytes.