Class AdmissionGate
java.lang.Object
org.cloudburstmc.netty.signaling.admission.AdmissionGate
Bounded admission reservations and records of used tokens. Packet processing stays native.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final recordstatic final classstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclose()voidconnected(AdmissionGate.Reservation reservation) voiddrain()booleanfinish(AdmissionGate.Reservation reservation) Call only once native teardown is complete, or when native creation never started.voidbooleanAdmission policy state only; capacity and installed credentials are checked separately.pollPendingLimitWarning(long nowNanos) Read one aggregate warning on the owner thread.booleanready(AdmissionGate.Reservation reservation) Native STUN verification and peer creation succeeded.reserve(AdmissionRequest request, long nowMillis, long nowNanos) Reserve capacity after token validation.stats()sweep(long nowMillis, long nowNanos) Mark timed-out handshakes for closure.
-
Constructor Details
-
AdmissionGate
-
-
Method Details
-
reserve
Reserve capacity after token validation. Native STUN verification must still succeed. -
ready
Native STUN verification and peer creation succeeded. A used token cannot allocate another peer. -
connected
-
invalidNativeRequest
public void invalidNativeRequest() -
finish
Call only once native teardown is complete, or when native creation never started. -
sweep
Mark timed-out handshakes for closure. Capacity stays reserved until finish is called. -
drain
public void drain() -
isServing
public boolean isServing()Admission policy state only; capacity and installed credentials are checked separately. -
close
-
stats
-
pollPendingLimitWarning
Read one aggregate warning on the owner thread.
-