Class DataRateSpec.LongBytesPerSecondBound

  • Enclosing class:
    DataRateSpec

    public static final class DataRateSpec.LongBytesPerSecondBound
    extends DataRateSpec
    Represents a data rate used for Cassandra configuration. The bound is [0, Long.MAX_VALUE) in bytes per second. If the user sets a different unit, we still validate that converted to bytes per second the quantity will not exceed that upper bound. (CASSANDRA-17571)
    • Constructor Detail

      • LongBytesPerSecondBound

        public LongBytesPerSecondBound​(java.lang.String value)
        Creates a DataRateSpec.LongBytesPerSecondBound of the specified amount.
        Parameters:
        value - the data rate
      • LongBytesPerSecondBound

        public LongBytesPerSecondBound​(long quantity,
                                       DataRateSpec.DataRateUnit unit)
        Creates a DataRateSpec.LongBytesPerSecondBound of the specified amount in the specified unit.
        Parameters:
        quantity - where quantity shouldn't be bigger than Long.MAX_VALUE - 1 in bytes per second
        unit - in which the provided quantity is
      • LongBytesPerSecondBound

        public LongBytesPerSecondBound​(long bytesPerSecond)
        Creates a DataRateSpec.LongBytesPerSecondBound of the specified amount in bytes per second.
        Parameters:
        bytesPerSecond - where bytesPerSecond shouldn't be bigger than Long.MAX_VALUE
    • Method Detail

      • megabitsPerSecondInBytesPerSecond

        @Deprecated(since="4.1")
        public static DataRateSpec.LongBytesPerSecondBound megabitsPerSecondInBytesPerSecond​(long megabitsPerSecond)
        Deprecated.
        See CASSANDRA-17225