com.github.cloudfiles.crypt.fs.resolver

Members list

Type members

Classlikes

A module providing a PathResolver implementation that caches the paths it has already resolved.

A module providing a PathResolver implementation that caches the paths it has already resolved.

This resolver implementation is appropriate if there are many operations to resolve paths and if the algorithm in used yields different results for each encrypt operation. Internally, it makes use of an actor that manages an LRU cache of a configured size. When asked to resolve a specific path, it iterates over the single path components. The components that have already been resolved can be looked up directly from the cache. For the remaining components, the content of the single folders are loaded, and all element names are decrypted and added to the cache. So, provided that the cache has a sufficient size, later resolve operations for elements in the same folder structure can be served efficiently.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
class PathComponentsResolver[ID, FILE <: File[ID], FOLDER <: Folder[ID]] extends PathResolver[ID, FILE, FOLDER]

A specialized ''PathResolver'' implementation that resolves paths directly by matching the single components against the decrypted path names on each level.

A specialized ''PathResolver'' implementation that resolves paths directly by matching the single components against the decrypted path names on each level.

This is the most basic resolver to be used if the single path components cannot simply be encrypted (because encryption involves a random initial vector, so that each encrypt operation yields different results). The implementation navigates through the single path components. For each component, the folder content is requested, and the names of its elements are decrypted, until a match is found. This is a rather expensive operation.

This implementation is appropriate if only few resolve operations are done, and the client mainly uses IDs to access elements directly. In this case, for the few resolve operations there is no benefit in spending additional effort in caching or other optimizations.

Type parameters

FILE

the type of files

FOLDER

the type of folders

ID

the type of IDs used by the file system

Attributes

Supertypes
trait PathResolver[ID, FILE, FOLDER]
trait AutoCloseable
class Object
trait Matchable
class Any
trait PathResolver[ID, FILE <: File[ID], FOLDER <: Folder[ID]] extends AutoCloseable

A trait defining a component that can resolve paths on a file system with encrypted file and folder names.

A trait defining a component that can resolve paths on a file system with encrypted file and folder names.

In such a file system, resolving a path can become an expensive operation. Depending on the cryptographic algorithm in use, it may not be sufficient to just encrypt the path; if every encrypt operation yields different output, this does not help. It is then necessary to traverse the path to be resolved and find a match for all components.

This trait defines a generic signature for a resolve operation. There can be multiple implementations with different characteristics that support concrete use cases better or worse.

If a concrete ''PathResolver'' implementation requires some state to be managed, e.g. when a kind of cache is used, it may be necessary to free resources when the resolver is no longer needed. To make this possible, this trait extends ''AutoClosable''. It also provides an empty default implementation of the ''close()'' method.

Type parameters

FILE

the type of files

FOLDER

the type of folders

ID

the type of IDs used by the file system

Attributes

Supertypes
trait AutoCloseable
class Object
trait Matchable
class Any
Known subtypes
class PathComponentsResolver[ID, FILE, FOLDER]