Class VelocityLimitParams.Period
-
- All Implemented Interfaces:
public final class VelocityLimitParams.PeriodThe size of the trailing window to calculate Spend Velocity over in seconds. The minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceVelocityLimitParams.Period.VisitorAn interface that defines how to map each variant of Period to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<Long>trailingWindow()The size of the trailing window to calculate Spend Velocity over in seconds. final Optional<VelocityLimitParamsPeriodWindow>velocityLimitParamsPeriodWindow()The window of time to calculate Spend Velocity over. final BooleanisTrailingWindow()final BooleanisVelocityLimitParamsPeriodWindow()final LongasTrailingWindow()The size of the trailing window to calculate Spend Velocity over in seconds. final VelocityLimitParamsPeriodWindowasVelocityLimitParamsPeriodWindow()The window of time to calculate Spend Velocity over. final Optional<JsonValue>_json()final <T extends Any> Taccept(VelocityLimitParams.Period.Visitor<T> visitor)final VelocityLimitParams.Periodvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static VelocityLimitParams.PeriodofTrailingWindow(Long trailingWindow)The size of the trailing window to calculate Spend Velocity over in seconds. final static VelocityLimitParams.PeriodofVelocityLimitParamsPeriodWindow(VelocityLimitParamsPeriodWindow velocityLimitParamsPeriodWindow)The window of time to calculate Spend Velocity over. -
-
Method Detail
-
trailingWindow
final Optional<Long> trailingWindow()
The size of the trailing window to calculate Spend Velocity over in seconds. The minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days).
-
velocityLimitParamsPeriodWindow
final Optional<VelocityLimitParamsPeriodWindow> velocityLimitParamsPeriodWindow()
The window of time to calculate Spend Velocity over.
DAY: Velocity over the current day since midnight Eastern Time.WEEK: Velocity over the current week since 00:00 / 12 AM on Monday in Eastern Time.MONTH: Velocity over the current month since 00:00 / 12 AM on the first of the month in Eastern Time.YEAR: Velocity over the current year since 00:00 / 12 AM on January 1st in Eastern Time.
-
isTrailingWindow
final Boolean isTrailingWindow()
-
isVelocityLimitParamsPeriodWindow
final Boolean isVelocityLimitParamsPeriodWindow()
-
asTrailingWindow
final Long asTrailingWindow()
The size of the trailing window to calculate Spend Velocity over in seconds. The minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days).
-
asVelocityLimitParamsPeriodWindow
final VelocityLimitParamsPeriodWindow asVelocityLimitParamsPeriodWindow()
The window of time to calculate Spend Velocity over.
DAY: Velocity over the current day since midnight Eastern Time.WEEK: Velocity over the current week since 00:00 / 12 AM on Monday in Eastern Time.MONTH: Velocity over the current month since 00:00 / 12 AM on the first of the month in Eastern Time.YEAR: Velocity over the current year since 00:00 / 12 AM on January 1st in Eastern Time.
-
accept
final <T extends Any> T accept(VelocityLimitParams.Period.Visitor<T> visitor)
-
validate
final VelocityLimitParams.Period validate()
-
ofTrailingWindow
final static VelocityLimitParams.Period ofTrailingWindow(Long trailingWindow)
The size of the trailing window to calculate Spend Velocity over in seconds. The minimum value is 10 seconds, and the maximum value is 2678400 seconds (31 days).
-
ofVelocityLimitParamsPeriodWindow
final static VelocityLimitParams.Period ofVelocityLimitParamsPeriodWindow(VelocityLimitParamsPeriodWindow velocityLimitParamsPeriodWindow)
The window of time to calculate Spend Velocity over.
DAY: Velocity over the current day since midnight Eastern Time.WEEK: Velocity over the current week since 00:00 / 12 AM on Monday in Eastern Time.MONTH: Velocity over the current month since 00:00 / 12 AM on the first of the month in Eastern Time.YEAR: Velocity over the current year since 00:00 / 12 AM on January 1st in Eastern Time.
-
-
-
-