Package com.mapr.cli.table
Class RecentTablesListManager
java.lang.Object
com.mapr.cli.table.RecentTablesListManager
- Direct Known Subclasses:
RecentStreamsListManager
- 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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds to the top of recent tables list.voidDeletes from the recent tables list.voiddeleteIfNotExist(String tablePath, com.mapr.fs.MapRFileSystem mfs) protected Stringprotected StringbooleanCheck ifuserhas a home directory or not.voidMove up the to the top of the recent tables list, if it exists.
-
Constructor Details
-
RecentTablesListManager
-
-
Method Details
-
hasHomeDir
public boolean hasHomeDir()Check ifuserhas a home directory or not.- Returns:
-
add
Adds to the top of recent tables list. Keeps the list size toMAX_RECENT_TABLES_LIST_SIZE- Parameters:
newTable-
-
moveToTop
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
Deletes from the recent tables list.- Parameters:
tablePath-
-
deleteIfNotExist
-
getListFromFile
-
getPathForRecentList
-
getHomeDir
-