Class EgressRate
java.lang.Object
com.eqixiac.equinix.design.value.ratecard.EgressRate
A usage-based data-egress price expressed per gigabyte, tagged with its
PriceSource. Unlike PriceQuote (which models recurring and
one-time charges for provisioned resources), an egress rate is multiplied by a
monthly data volume to produce a cost, so it is the unit that drives the
internet-vs-private savings calculation.
The price is per decimal (SI) gigabyte - 1 TB = 1000 GB -
matching DataUnit and how the engines express volume. A provider list
price quoted per Gibibyte must be converted before being supplied here
(the bundled GCP adapter divides its per-GiB figure by 1.073741824 and records
the original in the note).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncostFor(BigDecimal gigabytes) Computes the egress cost for a given monthly volume.static EgressRateof(BigDecimal pricePerGb, Currency currency, PriceSource source) Creates an egress rate.Returns a copy of this rate with the note replaced (this instance is immutable and unchanged).
-
Constructor Details
-
EgressRate
public EgressRate()
-
-
Method Details
-
of
Creates an egress rate.- Parameters:
pricePerGb- the per-GB price (defaults to zero if null)currency- the currencysource- the provenance- Returns:
- a new egress rate
-
withNote
Returns a copy of this rate with the note replaced (this instance is immutable and unchanged). The provider adapters use it to record where a figure came from - e.g. the meter name or the original per-GiB price a converted rate was derived from.- Parameters:
note- the provenance note to attach (replaces any existing note)- Returns:
- a new rate identical to this one but carrying the given note
-
costFor
Computes the egress cost for a given monthly volume.- Parameters:
gigabytes- the monthly egress volume in GB- Returns:
pricePerGb × gigabytes
-