Class RecentTablesListManager

java.lang.Object
com.mapr.cli.table.RecentTablesListManager
Direct Known Subclasses:
RecentStreamsListManager

public class RecentTablesListManager extends Object
- Manages the recent tables list of a user. - Persists the list to /user//.recent_tables file. - Limits the number of entries in this file to MAX_RECENT_TABLES_LIST_SIZE Author: smarella
  • Constructor Details

    • RecentTablesListManager

      public RecentTablesListManager(String user)
  • Method Details

    • hasHomeDir

      public boolean hasHomeDir()
      Check if user has a home directory or not.
      Returns:
    • add

      public void add(String newTable)
      Adds to the top of recent tables list. Keeps the list size to MAX_RECENT_TABLES_LIST_SIZE
      Parameters:
      newTable -
    • moveToTop

      public void moveToTop(String mostRecentTable)
      Move up the to the top of the recent tables list, if it exists. Else, add it to the top of the list.
      Parameters:
      mostRecentTable -
    • delete

      public void delete(String tablePath)
      Deletes from the recent tables list.
      Parameters:
      tablePath -
    • deleteIfNotExist

      public void deleteIfNotExist(String tablePath, com.mapr.fs.MapRFileSystem mfs)
    • getListFromFile

      public List<String> getListFromFile()
    • getPathForRecentList

      protected String getPathForRecentList()
    • getHomeDir

      protected String getHomeDir()