Class RpcUserAuthCounter

java.lang.Object
com.perforce.p4java.impl.mapbased.rpc.helper.RpcUserAuthCounter

public class RpcUserAuthCounter extends Object
Keeps track of the user's login/out counts per RPC server.
  • Constructor Details

    • RpcUserAuthCounter

      public RpcUserAuthCounter()
  • Method Details

    • incrementAndGet

      public int incrementAndGet(String authPrefix)
      Increment and get the count for the specified user auth prefix.
      Parameters:
      authPrefix - the auth prefix
      Returns:
      the int
    • decrementAndGet

      public int decrementAndGet(String authPrefix)
      Decrement and get the count for the specified user auth prefix.
      Parameters:
      authPrefix - the auth prefix
      Returns:
      the int
    • getCount

      public int getCount(String authPrefix)
      Gets the count for the specified user auth prefix.
      Parameters:
      authPrefix - the auth prefix
      Returns:
      the count
    • clearCount

      public void clearCount()
      Clears all counts for the RPC server.
    • toString

      public String toString()
      Returns the string value of the user auth counter.
      Overrides:
      toString in class Object