Class DelegationTokenCleanupManager

java.lang.Object
org.apache.zookeeper.server.token.DelegationTokenCleanupManager

public class DelegationTokenCleanupManager extends Object
Removes expired delegation tokens from the store and, with key rotation enabled, keeps the master key fresh. Modeled after ContainerManager: meant to run on the leader (or a standalone server), periodically scans the token znodes and posts internal cancel/roll requests through the normal request pipeline, so the changes replicate as ordinary transactions.
  • Field Details

  • Constructor Details

  • Method Details

    • start

      public void start()
      Start or restart the periodic check. Safe to call multiple times.
    • stop

      public void stop()
      Stop the periodic check. Safe to call multiple times.
    • checkTokens

      public void checkTokens()
      Scans the token store once and posts cancel requests for expired tokens. Public so tests can trigger a pass directly.
    • checkKeys

      public void checkKeys()
      Checks master key freshness once and posts a roll request when the newest valid key is missing or older than the roll interval. Public so tests can trigger a pass directly.
    • postCancelRequest

      protected void postCancelRequest(Request request) throws RequestProcessor.RequestProcessorException
      Throws:
      RequestProcessor.RequestProcessorException