Class AdmissionGate

java.lang.Object
org.cloudburstmc.netty.signaling.admission.AdmissionGate

public final class AdmissionGate extends Object
Bounded admission reservations and records of used tokens. Packet processing stays native.
  • Constructor Details

  • Method Details

    • reserve

      public AdmissionGate.Reservation reserve(AdmissionRequest request, long nowMillis, long nowNanos)
      Reserve capacity after token validation. Native STUN verification must still succeed.
    • ready

      public boolean ready(AdmissionGate.Reservation reservation)
      Native STUN verification and peer creation succeeded. A used token cannot allocate another peer.
    • connected

      public void connected(AdmissionGate.Reservation reservation)
    • invalidNativeRequest

      public void invalidNativeRequest()
    • finish

      public boolean finish(AdmissionGate.Reservation reservation)
      Call only once native teardown is complete, or when native creation never started.
    • sweep

      public List<AdmissionGate.Reservation> sweep(long nowMillis, long nowNanos)
      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

      public AdmissionGate.Stats stats()
    • pollPendingLimitWarning

      public AdmissionGate.PendingLimitWarning pollPendingLimitWarning(long nowNanos)
      Read one aggregate warning on the owner thread.