Class: Pione::System::FileCache::FileCacheMethod
- Inherits:
-
Object
- Object
- Pione::System::FileCache::FileCacheMethod
- Defined in:
- lib/pione/system/file-cache.rb
Overview
FileCache is an interface class of cache methods.
Direct Known Subclasses
Class Method Summary collapse
-
.name ⇒ String
Return the name.
-
.set_name(name) ⇒ Object
Name the file cache method class.
Instance Method Summary collapse
-
#cached?(location) ⇒ Boolean
Return true if the location is cached.
-
#clear ⇒ void
Clear cache.
-
#get(location) ⇒ BasicLocalLocation
Get the cache path of the location.
-
#put(src, location) ⇒ void
Put and cache the source data at the location.
-
#sync(old_location, new_location) ⇒ void
Synchronize cache of old location with new location.
Class Method Details
.name ⇒ String
Return the name.
115 116 117 |
# File 'lib/pione/system/file-cache.rb', line 115 def self.name @name end |
.set_name(name) ⇒ Object
Name the file cache method class.
107 108 109 110 |
# File 'lib/pione/system/file-cache.rb', line 107 def self.set_name(name) @name = name FileCache.register_file_cache_method(name, self) end |
Instance Method Details
#cached?(location) ⇒ Boolean
Return true if the location is cached.
155 156 157 |
# File 'lib/pione/system/file-cache.rb', line 155 def cached?(location) raise NotImplementedError end |
#clear ⇒ void
This method returns an undefined value.
Clear cache.
162 163 164 |
# File 'lib/pione/system/file-cache.rb', line 162 def clear raise NotImplementedError end |
#get(location) ⇒ BasicLocalLocation
Get the cache path of the location.
125 126 127 |
# File 'lib/pione/system/file-cache.rb', line 125 def get(location) raise NotImplementedError end |
#put(src, location) ⇒ void
This method returns an undefined value.
Put and cache the source data at the location.
136 137 138 |
# File 'lib/pione/system/file-cache.rb', line 136 def put(src, location) raise NotImplementedError end |
#sync(old_location, new_location) ⇒ void
This method returns an undefined value.
Synchronize cache of old location with new location.
147 148 149 |
# File 'lib/pione/system/file-cache.rb', line 147 def sync(old_location, new_location) raise NotImplementedError end |