Class FeatureCache
FeatureCache is a cache system used in FeatureSource to speed up the fetching data system.
public class FeatureCache
- Inheritance
-
FeatureCache
- Inherited Members
Remarks
The FeatureCache system uses the BoundingBox as the "Key" to cache the features. For example, if I first get data for a BoundingBox(BoundingBox1) and cache the features within the BoundingBox, in the future if I want to get the features within another BoundingBox(BoundingBox2) which is within BoundingBox1, I will get the features directly from the FeatureCache instead of from FileSystem or DBSystem.
Constructors
FeatureCache()
This is the default constructor that will create a new instance of the FeatureCache.
public FeatureCache()
Remarks
The cache system is not used by default. If you want to use it, you must set the IsActive property to true.
Properties
IsActive
This boolean property sepcifies whether cache system is active or not.
public bool IsActive { get; set; }
Property Value
Methods
Add(RectangleShape, Collection<Feature>)
This method will add an item to the FeatureCache system by passing a WorldExtent as "Key" and a collection of features as its corresponding cached features.
public void Add(RectangleShape worldExtent, Collection<Feature> features)
Parameters
worldExtent
RectangleShapefeatures
Collection<Feature>
Remarks
This method is the concrete wrapper for the virtual method AddCore. It
will return whatever is returned by the AddCore method.
To determine what the default implementation of the abstract
AddCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
Exceptions
- ArgumentNullException
In the event you attempt to call this method by passing a null for the WorldExtent, it will throw an ArgumentNullException.
- InvalidOperationException
In the event you attempt to call this method by passing a Invalid RectangleShape for the WorldExtent, it will throw an InvalidOperationException.
- ArgumentNullException
In the event you attempt to call this method by passing a null for the Collection of features, it will throw an ArgumentNullException.
AddCore(RectangleShape, Collection<Feature>)
This method will add an item to the FeatureCache system by passing a WorldExtent as "Key" and a collection of features as its corresponding cached features.
protected virtual void AddCore(RectangleShape worldExtent, Collection<Feature> features)
Parameters
worldExtent
RectangleShapefeatures
Collection<Feature>
Remarks
This method is the concrete wrapper for the virtual method AddCore. It
will return whatever is returned by the AddCore method.
To determine what the default implementation of the abstract
AddCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
Exceptions
- ArgumentNullException
In the event you attempt to call this method by passing a null for the WorldExtent, it will throw an ArgumentNullException.
- InvalidOperationException
In the event you attempt to call this method by passing a Invalid RectangleShape for the WorldExtent, it will throw an InvalidOperationException.
- ArgumentNullException
In the event you attempt to call this method by passing a null for the Collection of features, it will throw an ArgumentNullException.
Clear()
This method clears all of the CachedItems in this FeatureCache.
public void Clear()
Close()
The default implementation is to do nothing.
public void Close()
Remarks
This method is the concrete wrapper for the virtual method CloseCore. It
will return whatever is returned by the CloseCore method.
To determine what the default implementation of the abstract
CloseCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
CloseCore()
The default implementation is to do nothing.
protected virtual void CloseCore()
Remarks
This method is the concrete wrapper for the virtual method CloseCore. It
will return whatever is returned by the CloseCore method.
To determine what the default implementation of the abstract
CloseCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
GetFeatures(RectangleShape)
This method returns a Collection of Features cached in the FeatureCache system. All of the returning features are within the BoundingBox and were fetched from FileSystem or DBSystem in a previous operation.
public Collection<Feature> GetFeatures(RectangleShape worldExtent)
Parameters
worldExtent
RectangleShape
Returns
- Collection<Feature>
This method returns a Collection of Features cached in the FeatureCache system.
Remarks
This method is the concrete wrapper for the virtual method GetFeaturesCore. It
will return whatever is returned by the GetBoundingBoxCore method.
To determine what the default implementation of the abstract
GetBoundingBoxCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
Exceptions
- ArgumentNullException
In the event you attempt to call this method by passing a null, it will throw an ArgumentNullException.
GetFeaturesCore(RectangleShape)
This method returns a Collection of Features cached in the FeatureCache system. All of the returning features are within the BoundingBox and were fetched from FileSystem or DBSystem in a previous operation.
protected virtual Collection<Feature> GetFeaturesCore(RectangleShape worldExtent)
Parameters
worldExtent
RectangleShape
Returns
- Collection<Feature>
This method returns a Collection of Features cached in the FeatureCache system.
Remarks
This method is the concrete wrapper for the virtual method GetFeaturesCore. It
will return whatever is returned by the GetBoundingBoxCore method.
To determine what the default implementation of the abstract
GetBoundingBoxCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
Exceptions
- ArgumentNullException
In the event you attempt to call this method by passing a null, it will throw an ArgumentNullException.
IsExtentCached(RectangleShape)
This method determines whether the WorldExtent is already cached in the FeatureCache System.
public bool IsExtentCached(RectangleShape worldExtent)
Parameters
worldExtent
RectangleShapeThe target WorldExtent which will be determined as already cached or not.
Returns
- bool
True if the specified WorldExtent is already cached. Otherwise, returns false.
Open()
The default implementation is to do nothing.
public void Open()
Remarks
This method is the concrete wrapper for the virtual method OpenCore. It
will return whatever is returned by the OpenCore method.
To determine what the default implementation of the abstract
OpenCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.
OpenCore()
The default implementation is to do nothing.
protected virtual void OpenCore()
Remarks
This method is the concrete wrapper for the virtual method OpenCore. It
will return whatever is returned by the OpenCore method.
To determine what the default implementation of the abstract
OpenCore method is, please see the documentation for it.
As this is a concrete public method that wraps a Core method, we reserve the right
to add events and other logic to pre- or post-process data returned by the Core version
of the method. In this way, we leave our framework open on our end, but also allow you
the developer to extend our logic to suit your needs. If you have questions about this,
please contact our support team as we would be happy to work with you on extending our
framework.