public class TransformationCache extends Object
TransformationData objects) that can be executed by QVTo executors during
reconfigurations. To store a transformation in the cache, its corresponding URI is used
as tag.| Constructor and Description |
|---|
TransformationCache(URI... initialTransformations)
Initializes a new instance of the
TransformationCache class. |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the cache, that is, all content is discarded.
|
boolean |
contains(URI transformationUri)
Gets whether the QVTo transformation which the given URI points to, is currently in the
cache.
|
Optional<TransformationData> |
get(URI transformationUri)
Attempts to retrieve the QVTo transformation that is associated with the given URI from the
cache.
|
Iterable<TransformationData> |
getAll()
Gets all the transformations, in terms of the respective
TransformationData currently
stored in this cache. |
void |
remove(URI... transformationUris)
Removes the QVTo transformations specified by the given URIs from this cache, if present.
|
TransformationCache |
snapshot()
Creates a snapshot of the current state of the cache.
More precisely, this method creates an instance that contains the same transformations as this one. |
void |
store(URI... transformationUris)
Stores the QVTo transformations specified by the given URIs in the cache.
|
@SafeVarargs public TransformationCache(URI... initialTransformations)
TransformationCache class.initialTransformations - A set of transformation URIs that shall be stored in the cache, might
be empty.public TransformationCache snapshot()
TransformationCache which is a snapshot of the current state of this
instance.@SafeVarargs public final void store(URI... transformationUris)
transformationUris - A set of URIs that point to QVTo transformations.NullPointerException - In case transformationUris == null.IllegalArgumentException - In case any of the transformations is already present in the cache.@SafeVarargs public final void remove(URI... transformationUris)
transformationUris - A set of URIs that point to QVTo transformations.NullPointerException - In case any of the given uris is null.public Optional<TransformationData> get(URI transformationUri)
transformationUri - A URI that points to a QVTo transformation.Optional containing the TransformationData of the transformation,
which is empty if the transformation is not present in cache.NullPointerException - In case the given URI is null.contains(URI)public boolean contains(URI transformationUri)
transformationUri - A URI that points to a QVTo transformation.true, iff the transformation is stored, false otherwiseNullPointerException - In case the given URI is null.public Iterable<TransformationData> getAll()
TransformationData currently
stored in this cache.Iterable of all the stored transformations.public void clear()