/// <summary>An application has no more outstanding requests.</summary> /// <param name="user">application user</param> /// <param name="applicationId">deactivated application</param> public virtual void DeactivateApplication(string user, ApplicationId applicationId ) { lock (this) { ICollection <ApplicationId> userApps = usersApplications[user]; if (userApps != null) { if (userApps.Remove(applicationId)) { metrics.DeactivateApp(user); } if (userApps.IsEmpty()) { Sharpen.Collections.Remove(usersApplications, user); --activeUsers; metrics.DecrActiveUsers(); Log.Debug("User " + user + " removed from activeUsers, currently: " + activeUsers ); } } } }