class Pione::System::FileCache::FileCacheMethod
FileCache
is an interface class of cache methods.
Public Class Methods
name()
click to toggle source
Return the name.
@return [String] the name
# File lib/pione/system/file-cache.rb, line 115 def self.name @name end
set_name(name)
click to toggle source
Name the file cache method class.
@param name [String]
cache mtehod name
# File lib/pione/system/file-cache.rb, line 107 def self.set_name(name) @name = name FileCache.register_file_cache_method(name, self) end
Public Instance Methods
cached?(location)
click to toggle source
Return true if the location is cached.
@return [Boolean]
true if the location is cached
# File lib/pione/system/file-cache.rb, line 155 def cached?(location) raise NotImplementedError end
clear()
click to toggle source
Clear cache.
@return [void]
# File lib/pione/system/file-cache.rb, line 162 def clear raise NotImplementedError end
get(location)
click to toggle source
Get the cache path of the location.
@param location [BasicLocation]
data location
@return [BasicLocalLocation]
cached path
# File lib/pione/system/file-cache.rb, line 125 def get(location) raise NotImplementedError end
put(src, location)
click to toggle source
Put and cache the source data at the location.
@param src [BasicLocation]
source path
@param location [BasicLocation]
destination
@return [void]
# File lib/pione/system/file-cache.rb, line 136 def put(src, location) raise NotImplementedError end
sync(old_location, new_location)
click to toggle source
Synchronize cache of old location with new location.
@param old_location [BasicLocation]
old data location
@param new_location [BasicLocation]
new data location
@return [void]
# File lib/pione/system/file-cache.rb, line 147 def sync(old_location, new_location) raise NotImplementedError end