code: public int closeSessions(String workspaceName)
     {
        int closedSessions = 0;
  
        for (SessionImpl session : sessionsMap.values())
        {
           if (session.getWorkspace().getName().equals(workspaceName))
           {
              session.logout();
              closedSessions++;
           }
        }
  
        return closedSessions;
     }
docs: closeSessions will be closed the all sessions on specific workspace.
  
  @param workspaceName
  the workspace name.
  @return int
  how many sessions was closed.