#include <vtkCacheManager.h>
| anonymous enum |
| vtkCacheManager::vtkCacheManager | ( | ) | [protected] |
| vtkCacheManager::~vtkCacheManager | ( | ) | [protected, virtual] |
| vtkCacheManager::vtkCacheManager | ( | const vtkCacheManager & | ) | [protected] |
References GetRemoteCacheDirectory(), mathExample::n, and autoSlicerTracto2regions::ret.
Checks to see if the The uri provided exists on disk. If not, it appends the Remote Cache Directory path and checks again, in case no path was provided. If neither exists, returns 0. If one exists, returns 1.
References RemoteCacheDirectory.
Referenced by vtkDataIOManagerLogic::DeleteDataTransferFromCache(), vtkSlicerDataTransferWidget::DeleteTransferFromCache(), and vtkDataIOManagerLogic::QueueRead().
| void vtkCacheManager::CacheSizeCheck | ( | ) |
References CacheLimitExceededEvent, ComputeCacheSize(), CurrentCacheSize, RemoteCacheDirectory, and RemoteCacheLimit.
| bool vtkCacheManager::CacheSizeQuickCheck | ( | ) |
References CacheLimitExceededEvent, ComputeCacheSize(), CurrentCacheSize, RemoteCacheDirectory, and RemoteCacheLimit.
| int vtkCacheManager::ClearCache | ( | ) |
Removes all files from the cachedir and removes all filenames from CachedFileList
References CacheClearEvent, MarkNodesBeforeDeletingDataFromCache(), FW::Actions::Modified, RemoteCacheDirectory, and UpdateCacheInformation().
Referenced by vtkDataIOManagerLogic::ClearCache().
| int vtkCacheManager::ClearCacheCheck | ( | ) |
This method is called after ClearCache(), to see if that method actually cleaned the cache. If not, an event (CacheDirtyEvent) is invoked.
References CacheDirtyEvent, and GetRemoteCacheDirectory().
| float vtkCacheManager::ComputeCacheSize | ( | const char * | dirname, | |
| unsigned long | size | |||
| ) |
---compute dir and filename for recursive hunt
References CurrentCacheSize, GetRemoteCacheDirectory(), and MB.
Referenced by CacheSizeCheck(), CacheSizeQuickCheck(), GetCurrentCacheSize(), GetFreeCacheSpaceRemaining(), and vtkSlicerCacheAndDataIOManagerGUI::UpdateOverviewPanel().
| void vtkCacheManager::DeleteFromCache | ( | const char * | target | ) |
Remove a target directory or file from the cache.
References CacheDeleteEvent, DeleteFromCachedFileList(), FindCachedFile(), GetRemoteCacheDirectory(), MarkNodesBeforeDeletingDataFromCache(), and UpdateCacheInformation().
Referenced by vtkDataIOManagerLogic::DeleteDataTransferFromCache(), and vtkSlicerDataTransferWidget::DeleteTransferFromCache().
| void vtkCacheManager::DeleteFromCachedFileList | ( | const char * | target | ) |
Removes a target from the list of locally cached files and directories
References CachedFileList.
Referenced by DeleteFromCache().
References mathExample::n.
Takes a filename and a dirname (usually called with the RemoteCachedDirectory) and returns the full path of the filename if it exists under the dirname.
---compute dir and filename for recursive hunt
References GetRemoteCacheDirectory(), mathExample::n, and result.
Referenced by DeleteFromCache().
| void vtkCacheManager::FreeCacheBufferCheck | ( | ) |
References GetFreeCacheSpaceRemaining(), InsufficientFreeBufferEvent, MB, and RemoteCacheFreeBufferSize.
| std::vector< std::string > vtkCacheManager::GetAllCachedFiles | ( | ) | [private] |
References CachedFileList, GetCachedFileList(), and GetRemoteCacheDirectory().
References CachedFileList, and GetRemoteCacheDirectory().
Referenced by GetAllCachedFiles(), and UpdateCacheInformation().
| float vtkCacheManager::GetCurrentCacheSize | ( | ) |
References ComputeCacheSize(), CurrentCacheSize, RemoteCacheDirectory, and slicerget::size.
Referenced by PrintSelf(), vtkDataIOManager::QueueRead(), and vtkDataIOManagerLogic::QueueRead().
References uriMap.
Referenced by GetFilenameFromURI().
Extracts the filename from the URI and prepends the Remote Cache Directory path to it. Returns the full path. NOTE: this method looks at a filename's extension and if appended version numbers have been added, it attempts to strip them out of the extension and add them to the filenamebase. So filename.nrrd_010 would become filename.nrrd. This will cause problems for any file type with an '_' in its extension.
References fileName, GetFileFromURIMap(), GetRemoteCacheDirectory(), and mathExample::n.
Referenced by vtkDataIOManager::QueueRead(), vtkDataIOManagerLogic::QueueRead(), and vtkMRMLStorageNode::StageReadData().
| float vtkCacheManager::GetFreeCacheSpaceRemaining | ( | ) |
References ComputeCacheSize(), RemoteCacheDirectory, RemoteCacheFreeBufferSize, and RemoteCacheLimit.
Referenced by FreeCacheBufferCheck(), and vtkSlicerCacheAndDataIOManagerGUI::UpdateOverviewPanel().
| const char* vtkCacheManager::GetRemoteCacheDirectory | ( | ) | [inline] |
Returns the name of the directory to use for local file caching
Referenced by AddCachePathToFilename(), vtkSlicerCacheAndDataIOManagerGUI::BuildGUI(), ClearCacheCheck(), ComputeCacheSize(), vtkSlicerApplicationGUI::ConfigureRemoteIOSettings(), DeleteFromCache(), FindCachedFile(), GetAllCachedFiles(), GetCachedFileList(), GetFilenameFromURI(), PrintSelf(), vtkDataIOManagerLogic::QueueWrite(), SetRemoteCacheDirectory(), UpdateCacheInformation(), vtkSlicerCacheAndDataIOManagerGUI::UpdateOverviewPanel(), and vtkSlicerApplicationGUI::UpdateRemoteIOConfigurationForRegistry().
Looks for a 'file://' in the uri and if present, returns true.
References slicer::vtk::prefix.
Checks to see if a uri appears to point to remote location and returns true if so. Looks for a '://' and if present, checks to see if the prefix is 'file'. If not 'file' but the thing:/// pattern exists, then returns true.
References slicer::vtk::prefix.
Checks to see if a uri is a file on disk and returns true if so. Strips off a file:/// prefix if present, and expects an absolute path.
References slicer::vtk::prefix.
| void vtkCacheManager::MarkNode | ( | std::string | str | ) |
References vtkMRMLStorageNode::GetFullNameFromFileName(), vtkMRMLScene::GetNthNodeByClass(), vtkMRMLStorableNode::GetNthStorageNode(), vtkMRMLScene::GetNumberOfNodesByClass(), vtkMRMLStorableNode::GetNumberOfStorageNodes(), MRMLScene, and mathExample::n.
Referenced by MarkNodesBeforeDeletingDataFromCache().
| void vtkCacheManager::MarkNodesBeforeDeletingDataFromCache | ( | const char * | target | ) |
Before a file or directory is deleted, Marks any nodes that hold the uri as a reference as modified since read.
--- check in subdir too...
References MarkNode().
Referenced by ClearCache(), and DeleteFromCache().
| static vtkCacheManager* vtkCacheManager::New | ( | ) | [static] |
The Usual vtk class functions.
Referenced by Slicer3Helper::AddDataIOToScene(), and vtkCacheManager().
| void vtkCacheManager::operator= | ( | const vtkCacheManager & | ) | [protected] |
| void vtkCacheManager::PrintSelf | ( | ostream & | os, | |
| vtkIndent | indent | |||
| ) |
References GetCurrentCacheSize(), and GetRemoteCacheDirectory().
| void vtkCacheManager::SetEnableForceRedownload | ( | int | val | ) |
References EnableForceRedownload, and SettingsUpdateEvent.
Referenced by Slicer3Helper::AddDataIOToScene(), and vtkSlicerApplicationGUI::ConfigureRemoteIOSettings().
| void vtkCacheManager::SetMRMLScene | ( | vtkMRMLScene * | scene | ) | [inline] |
Referenced by Slicer3Helper::AddDataIOToScene(), and Slicer3Helper::RemoveDataIOFromScene().
| void vtkCacheManager::SetRemoteCacheDirectory | ( | const char * | dir | ) | [virtual] |
Sets the name of the directory to use for local file caching Does some checking to make sure this is a valid directory on the local system. Makes sure there's NO "/" at the end of the string, or kwsys/SystemTools will not see as a valid dir.
References GetRemoteCacheDirectory(), len, MRMLScene, mathExample::n, RemoteCacheDirectory, and SettingsUpdateEvent.
Referenced by vtkSlicerApplicationGUI::ConfigureRemoteIOSettings().
| void vtkCacheManager::SetRemoteCacheFreeBufferSize | ( | int | val | ) |
References RemoteCacheFreeBufferSize, and SettingsUpdateEvent.
Referenced by Slicer3Helper::AddDataIOToScene(), and vtkSlicerApplicationGUI::ConfigureRemoteIOSettings().
| void vtkCacheManager::SetRemoteCacheLimit | ( | int | val | ) |
References RemoteCacheLimit, and SettingsUpdateEvent.
Referenced by Slicer3Helper::AddDataIOToScene(), and vtkSlicerApplicationGUI::ConfigureRemoteIOSettings().
| void vtkCacheManager::UpdateCacheInformation | ( | ) |
Called when a file is loaded or removed from the cache.
References CachedFileList, GetCachedFileList(), and GetRemoteCacheDirectory().
Referenced by ClearCache(), and DeleteFromCache().
| vtkCacheManager::vtkGetMacro | ( | EnableForceRedownload | , | |
| int | ||||
| ) |
| vtkCacheManager::vtkGetMacro | ( | RemoteCacheFreeBufferSize | , | |
| int | ||||
| ) |
| vtkCacheManager::vtkGetMacro | ( | RemoteCacheLimit | , | |
| int | ||||
| ) |
| vtkCacheManager::vtkGetMacro | ( | InsufficientFreeBufferNotificationFlag | , | |
| int | ||||
| ) |
| vtkCacheManager::vtkSetMacro | ( | CurrentCacheSize | , | |
| float | ||||
| ) |
| vtkCacheManager::vtkSetMacro | ( | InsufficientFreeBufferNotificationFlag | , | |
| int | ||||
| ) |
| vtkCacheManager::vtkTypeRevisionMacro | ( | vtkCacheManager | , | |
| vtkObject | ||||
| ) |
std::vector< std::string > vtkCacheManager::CachedFileList [private] |
This array contains a list of cached file names (without paths) in case it's faster to search thru this list than to snuffle thru a large cache dir. Must keep current with every download, remove from cache, and clearcache call.
Referenced by DeleteFromCachedFileList(), GetAllCachedFiles(), GetCachedFileList(), UpdateCacheInformation(), vtkCacheManager(), and ~vtkCacheManager().
vtkCallbackCommand* vtkCacheManager::CallbackCommand [protected] |
Holder for callback
Referenced by vtkCacheManager(), and ~vtkCacheManager().
float vtkCacheManager::CurrentCacheSize [private] |
Referenced by CacheSizeCheck(), CacheSizeQuickCheck(), ComputeCacheSize(), GetCurrentCacheSize(), vtkCacheManager(), and ~vtkCacheManager().
int vtkCacheManager::EnableForceRedownload [private] |
Referenced by SetEnableForceRedownload(), vtkCacheManager(), and ~vtkCacheManager().
Referenced by vtkCacheManager(), and ~vtkCacheManager().
vtkMRMLScene* vtkCacheManager::MRMLScene [private] |
Referenced by MarkNode(), SetRemoteCacheDirectory(), vtkCacheManager(), and ~vtkCacheManager().
std::string vtkCacheManager::RemoteCacheDirectory [private] |
int vtkCacheManager::RemoteCacheLimit [private] |
| std::map<std::string, std::string> vtkCacheManager::uriMap |
Referenced by GetFileFromURIMap(), MapFileToURI(), vtkCacheManager(), and ~vtkCacheManager().
1.6.1