Record Class LocalRateLimitFilter.CounterWindow
java.lang.Object
java.lang.Record
org.chenile.security.auth.gateway.filter.LocalRateLimitFilter.CounterWindow
- Enclosing class:
LocalRateLimitFilter
private static record LocalRateLimitFilter.CounterWindow(Instant startedAt, AtomicInteger counter)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicIntegerThe field for thecounterrecord component.private final InstantThe field for thestartedAtrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateCounterWindow(Instant startedAt, AtomicInteger counter) Creates an instance of aCounterWindowrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncounter()Returns the value of thecounterrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thestartedAtrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
startedAt
The field for thestartedAtrecord component. -
counter
The field for thecounterrecord component.
-
-
Constructor Details
-
CounterWindow
Creates an instance of aCounterWindowrecord class.- Parameters:
startedAt- the value for thestartedAtrecord componentcounter- the value for thecounterrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
counter
Returns the value of thecounterrecord component.- Returns:
- the value of the
counterrecord component
-
CHENILE