Class: Pione::System::FileCache::FileCacheMethod

Inherits:
Object
  • Object
show all
Defined in:
lib/pione/system/file-cache.rb

Overview

FileCache is an interface class of cache methods.

Direct Known Subclasses

SimpleCacheMethod

Instance Method Summary collapse

Instance Method Details

#cached?(location) ⇒ Boolean

Return true if the location is cached.

Returns:

  • (Boolean)

    true if the location is cached

Raises:

  • (NotImplementedError)


115
116
117
# File 'lib/pione/system/file-cache.rb', line 115

def cached?(location)
  raise NotImplementedError
end

#clearvoid

This method returns an undefined value.

Clear cache.

Raises:

  • (NotImplementedError)


122
123
124
# File 'lib/pione/system/file-cache.rb', line 122

def clear
  raise NotImplementedError
end

#get(location) ⇒ BasicLocalLocation

Get the cache path of the location.

Parameters:

  • location (BasicLocation)

    data location

Returns:

  • (BasicLocalLocation)

    cached path

Raises:

  • (NotImplementedError)


85
86
87
# File 'lib/pione/system/file-cache.rb', line 85

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.

Parameters:

  • src (BasicLocation)

    source path

  • location (BasicLocation)

    destination

Raises:

  • (NotImplementedError)


96
97
98
# File 'lib/pione/system/file-cache.rb', line 96

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.

Parameters:

  • old_location (BasicLocation)

    old data location

  • new_location (BasicLocation)

    new data location

Raises:

  • (NotImplementedError)


107
108
109
# File 'lib/pione/system/file-cache.rb', line 107

def sync(old_location, new_location)
  raise NotImplementedError
end